fedora下apache错误代码400解决方法

来源:互联网 发布:量子编程 编辑:程序博客网 时间:2024/05/19 00:09

fedora下apache出错,错误代码400的解决办法
错误消息如下:

Bad Request
Your browser sent a request that this server could not understand.

Apache/2.2.0 (Fedora) Server at 127.0.0.1 Port 80

 

解决:
方法1:

编辑文件/etc/httpd/modsecurity.d/modsecurity_crs_21_protocol_anomalies.conf

注释掉此句(也就是在前面加"#"):
SecRule REQUEST_HEADERS:Host "^[/d/.]+$" "deny,log,auditlog,status:400,msg:'Host header is a numeric IP address', severity:'2',id:'960017'

然后重启服务httpd
这样子应该会存在安全漏洞。

 

方法2:

卸载mod_security包

 

原创粉丝点击