Debian Jessie 中的 Apache - 仍然收到消息 You don't have permission to access/on this server [英] Apache in Debian Jessie - still get message You don't have permission to access / on this server

查看:12
本文介绍了Debian Jessie 中的 Apache - 仍然收到消息 You don't have permission to access/on this server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

The same virtual config i apache wheezy works right. For example:

服务器名 lgbsServerAlias www.lgbs

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>

但在 Debian 测试Jessie"时,我仍然收到消息:

But on Debian testing 'Jessie' i still get message:

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

Forbidden You don't have permission to access / on this server. Apache/2.4.9 (Debian) Server at test Port 80

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

Of course a check file permision and i set rwx for evryones and owner and group is www-data. Thanks for help

推荐答案

这让我发疯了几个小时.显然在 2.4.9 中(我从 2.2.2 升级)有一个要求所有授予",您需要添加到每个目录.

This drove me crazy for a couple of hours. Apparently in 2.4.9 ( I upgraded from 2.2.2 ) there is a "Require all granted" that you need to add to each directory.

在我的 http.conf 中:

In my 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>

所以基本上我要做的是:

So basically what I had to do was:

<Directory "/Users/johndoe/Sites">
    Require all granted
</Directory>

这篇关于Debian Jessie 中的 Apache - 仍然收到消息 You don't have permission to access/on this server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆