与 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”时我仍然收到消息:
Forbidden 您无权访问此服务器上的/。 Apache/2.4.9 (Debian) 服务器在测试端口 80
当然,检查文件权限,我为 evryones 和所有者和组设置 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>
关于Debian Jessie 中的 Apache - 仍然收到消息您无权访问/在此服务器上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22905936/