403 Forbidden client denied by server configuration[apache2, linux]

在LAMP的配置过程中, 由于APACHE的版本问题, 即使是APACHE2和APACHE2.2也有很大的不同. 一般都有同一个环境配置多个虚拟网站的情况, 如果你在配置过程中遇到APACHE的不同版本的话, 你很有可能遇到如下的错误提示:

403 Forbidden You don't have permission to access / on this server

提示的信息很明显,就是没有权限, 可是, 这种语焉不详的提示是找不到任何有用的信息的, 遇到这种错误, 只能先去该站的日志中去找有用的信息. 通常它的信息主体是:

client denied by server configuration.

这个很明显,就是配置方面的问题, 赶紧去找它的配置文件, 我是编译安装的APACHE2.2, 所以我的配置文件在/etc/apache2/sites-available/和/etc/apache2/sites-enabled/, 找到对应的文件. 经查找资料可知. 问题出在根目录的配置部分, 对比apache2.0和apache2.2可以发现:

apache2:

<Directory >
Options FollowSymLinks
AllowOverride None
</Directory>

apache2.2:

 <Directory>
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

 

要解决这个问题, 或者去掉新加的那两行, 或者修改它:

        <Directory />
                Options FollowSymLinks
                AllowOverride None
                Order allow,deny   #注意顺序
                Allow from all
        </Directory>

 

然后保存, 重启, 即可解决

You don't have permission to access / on this server

这个问题. 同时

client denied by server configuration 这个错误也会消除, 至此, 问题解决.

参考文章:

http://raditha.com/blog/archives/896.html

http://wiki.apache.org/httpd/ClientDeniedByServerConfiguration

 

 source: http://www.cnblogs.com/wwufengg/p/client-denied-by-server-configuration.html

 

 
posted @ 2013-11-27 17:05  月影传说  阅读(1925)  评论(0编辑  收藏  举报