1.在Users/XXX 下面新建 ?Sites文件夾。
2.修改配置文件
---- 1) /etc/apache2/ ? ? http.conf
修改目錄顯示:
<Directory />
Options Indexes FollowSymLinks MultiViews??
? AllowOverride None? ??
Order deny,allow? ?
?Deny from all
</Directory>
修改當(dāng)前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 文件名