Apache2的:“AH01630:客户机通过服务器配置否认” [英] Apache2: 'AH01630: client denied by server configuration'
问题描述
尝试通过浏览器访问本地主机,当我得到这个错误。
I get this error when trying to access localhost via a browser.
AH01630: client denied by server configuration
我用我的检查站点文件夹权限:
I checked my site folder permissions using:
sudo chmod 777 -R *
下面是我的配置文件:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/user-name/www/myproject
<Directory />
Options FollowSymLinks
AllowOverride all
Allow from all
</Directory>
<Location />
Allow from all
Order Deny,Allow
</Location>
<Directory /home/user-name/www/myproject/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride all
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride all
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
推荐答案
如果您使用的是Apache 2.4
If you are using Apache 2.4
您必须检查允许和拒绝规则
You have to check allow and deny rules
查看<一个href=\"http://httpd.apache.org/docs/2.4/upgrading.html#access\">http://httpd.apache.org/docs/2.4/upgrading.html#access
在2.2,访问控制基于客户的主机名,IP地址,以及其他
客户端请求的特征是使用指令完成
令,允许,拒绝,最大限度的满足。
In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy.
在2.4,例如访问控制以相同的方式与其他做
授权检查,使用新的模块mod_authz_host。
In 2.4, such access control is done in the same way as other authorization checks, using the new module mod_authz_host.
新指令是要求:
2.2的配置:
Order allow,deny
Allow from all
2.4的配置:
2.4 configuration:
Require all granted
这篇关于Apache2的:“AH01630:客户机通过服务器配置否认”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!