相同的虚拟配置我 apache wheezy 工作正常。
例如:
服务器名称 lgbs
服务器别名 www.lgbs
DocumentRoot /home/vdomain/app/web
SetEnv APPLICATION_ENV "development"
<Directory /home/vdomain/app/web>
# enable the .htaccess rewrites
AllowOverride All
Order allow,deny
Allow from All
</Directory>
但在 Debian 测试“Jessie”时我仍然收到消息:
禁止访问 您无权访问此服务器上的 / 。
Apache/2.4.9 (Debian) 服务器位于测试端口 80
当然,检查文件权限,我为每个人、所有者和组设置 rwx 是 www-data。
感谢帮助
这让我发疯了几个小时。显然,在 2.4.9(我从 2.2.2 升级)中,您需要将“要求全部授予”添加到每个目录中。
在我的 http.conf 中:
#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other
# <Directory> blocks below.
#
<Directory />
AllowOverride none
Require all denied
</Directory>
所以基本上我必须做的是:
<Directory "/Users/johndoe/Sites">
Require all granted
</Directory>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)