MAC - Web Server 配置

1.在Users/XXX 下面新建  Sites文件夹。

2.修改配置文件

---- 1) /etc/apache2/     http.conf

修改目录显示:

<Directory />

Options Indexes FollowSymLinks MultiViews  

  AllowOverride None    

Order deny,allow   

 Deny from all

</Directory>

修改当前Directory 路径

#<Directory "/Library/WebServer/Documents">

<Directory "自己文件夹路径“>

#DocumentRoot "/Library/WebServer/Documents"

DocumentRoot  "自己文件夹路径“


---- 2) /etc/apache2/users XXX.conf

<Directory "自己文件夹路径“>

Options Indexes FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

Allow from all

</Directory>

3,浏览器里访问下localhost ,如果permission deny ,改文件permission 命令: chmod 777 文件名

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容