红联Linux门户
Linux帮助

Fedora7 Apache [403 Forbidden] [ 400 Bad Request ] 错误的一个解决办法

发布时间:2008-10-08 00:16:42来源:红联作者:Necisd
系统Fedora7,自带的LAMP系统运行正常,用yum升级了apache和几个相关模块后,访问Localhost,出现问题。

症状:本地访问localhost,403 Forbidden, You don’t have permissions to access / on this server.

远程访问, 400 Bad Request, Your browser send a request this server could not understand.

解决方法:

1、按照第一感觉是permission,查看目录permission,没有问题。

2、有类似问题,原因是SELinux,解决方法为:

chcon -R -t httpd_user_content_t 试过以后,问题继续。

全部disable SELinux,还是没用。

3、分析 error_log,相关部分如下:

[Sun Nov 11 07:30:06 2007] [error] [client 127.0.0.1] ModSecurity: Access denied with code 403 (phase 4)… …

4、在 /etc/httpd/conf.d 中,找到 mod_security 备份后删除,重启apache,问题解决。
文章评论

共有 0 条评论