【发布时间】:2016-10-03 19:47:02
【问题描述】:
我一直有这个access denied 错误。我在 CentOs 6.4 上使用 apache 2.2.15。
服务器与用户 apache 和组 apache 一起运行。
在家里,我有一个用户staging。我将他添加到 apache 组。
docs 文件夹的权限是:
drwxrwx--- 2 staging staging 4096 Oct 4 14:33 docs
我正在使用 index.html 文件进行测试:
-rw-r--r-- 1 staging staging 13 Oct 4 14:28 index.html
SELinux 已禁用。我使用的地址是 staging.mysite.com
我的httpd.conf 看起来像这样:
<Directory "/home/*/docs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
我还为我的暂存地址设置了一个虚拟主机:
<VirtualHost SERVERIP:80>
ServerName staging.mysite.com
DocumentRoot /home/staging/docs
ServerAdmin staging@mysite.com
CustomLog /home/staging/logs/access_log combined
</VirtualHost>
如果您需要更多信息,请告诉我,但知道为什么会出现此错误吗?
【问题讨论】:
标签: apache