web

MAC - Web Server 配置

2015-06-11  本文已影响789人  世界你好

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 文件名

上一篇下一篇

猜你喜欢

热点阅读