Mac MAMP 配置项目域名

1

首页修改Apache 的配置文件 如果是 MAMP 路径是 ”/Applications/MAMP/conf/apache/httpd.conf“

#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf 去掉注释,

保存后,用文本编辑器打开 /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf,加入需要配置的域名

 

     ServerName www.jg.com

     ServerAlias www.jg.com

     DocumentRoot "/Applications/MAMP/htdocs/web/blog"

    

         Options FollowSymLinks IncludesNOEXEC Indexes  

         DirectoryIndex index.html index.htm index.php  

         AllowOverride all  

         Order Deny,Allow  

         Allow from all  

         Require all granted  

      


保存后,来到host配置文件,/etc/hosts,添加域名保存退出

你可能感兴趣的:(Mac MAMP 配置项目域名)