我一直有這個access denied
錯誤。我正在使用apache 2.2.15 on CentOs 6.4。 服務器正以用戶apache
和組apache
運行。 在家中,我有一個用戶中轉。我將他添加到apache羣組。禁止:您沒有權限訪問/在此服務器上
權限上的文檔文件夾是:
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 [email protected]
CustomLog /home/staging/logs/access_log combined
</VirtualHost>
如果你需要更多的信息,讓我知道,但任何想法,爲什麼它給了我這個錯誤?
apache用戶是apache組的一部分,我像我說的那樣將分段用戶添加到apache組。 – user2847120
我讀到了,但apache組沒有對文檔文件夾的讀取權限。 –
我將/ home/staging/docs及其內容組更改爲apache,但它什麼都沒做...... – user2847120