2015-01-04 09:11

OS X 10.9 Forbidden 403, You don’t have permission to access /~username/ on this server

cd /etc/apache2/users
sudo vi 用户名.conf

OSX 10.9系统内置的Apache版本为:Apache 2.2
该conf文件内容应如下:

<Directory "/Users/用户名/Sites/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

然后重启Apache

sudo apachectl restart

如果到这一步还是提示403,继续:

sudo vi /etc/apache2/httpd.conf

找到

User _www
Group _www

改为:

User 用户名
Group staff

保存退出后再重启Apache,应该就可以了。

添加新评论