LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1862|回复: 1

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

[复制链接]
发表于 2007-11-10 20:24:47 | 显示全部楼层 |阅读模式
系统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
google下,有类似问题,原因是SELinux,解决方法为:
chcon -R -t httpd_user_content_t <your_web_root>        试过以后,问题继续。
全部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,问题解决。
5
分析了mod_security 的内容并查看 http://www.modsecurity.org 没有找到问题原因,只有暂时不用这个mod, 为什么mod_security会造成这个403错误,请大家指教原因。
发表于 2007-11-13 11:20:16 | 显示全部楼层
check your SELinux
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表