Apache error in fedora7: solution to code 400

Source: Internet
Author: User
Tags modsecurity
An error occurred in apache under fedora7. Solution to code 400: Linux Enterprise Application-Linux server application information. For details, refer to the following section. Problem:
If you enter 127.0.0.1 or the Host IP address in the browser, the following error occurs:
/**********/

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

Apache/2.2.0 (Fedora) Server at 127.0.0.1 Port 80

/*********/

If http: // host name/is opened in the browser on the host, the webpage can be opened normally without an error prompt.

View logs:
/**********/
[Mon Aug 27 08:15:56 2007] [error] [client 127.0.0.1] ModSecurity: Access denied with code 400 (phase 1 ). pattern match "^ [\\\\ d \\\\.] + $ "at REQUEST_HEADERS: Host. [id "960017"] [msg "Host header is a numeric IP address"] [severity "CRITICAL"] [hostname "127.0.0.1"] [uri "/"] [unique_id "QrBrQ38AAAEAACZ5GVAAAAAH "]
/******/

Solution:
Edit the/etc/httpd/modsecurity. d/modsecurity_crs_21_protocol_anomalies.conf file.

Comment out this sentence (that is, add "#" in front "#"):
SecRule REQUEST_HEADERS: Host "^ [\ d \.] + $ "" deny, log, auditlog, status: 400, msg: 'host header is a numeric IP address ', severity: '2', id: '123'

Restart the httpd service.
In this way, security vulnerabilities still exist.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.