Debian Jessie中的Apache - 仍然收到消息您无权访问此服务器上的/

use*_*671 3 apache debian

同样的虚拟配置我apache wheezy正常工作.例如:

ServerName lgbs ServerAlias 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>
Run Code Online (Sandbox Code Playgroud)

但在Debian测试'Jessie'上我仍然得到消息:

禁止您无权访问此服务器上的/.测试端口80的Apache/2.4.9(Debian)服务器

当然,检查文件permision和我为evryones和所有者和组设置rwx是www-data.感谢帮助

Ang*_*eno 5

这让我疯了几个小时.显然在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>
Run Code Online (Sandbox Code Playgroud)

所以我基本上要做的是:

<Directory "/Users/johndoe/Sites">
    Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)