Mod_Security of modules added to Apache over Fedora7

Source: Internet
Author: User
The Mod_Security module added to Apache over Fedora7-Linux Enterprise Application-Linux server application information. For more information, see below. To enhance the security of Apache2.0, The Mod_Security module is installed by default during system installation. However, due to the high security of this module, the following situations may occur?

When you use a real IP connection, an HTTP Error 400 message is displayed. The message is as follows:

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 an Ajax writer is used, the connection may fail.

Solution:

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

SecRule REQUEST_HEADERS: Host "^ [\ d \.] + $ "" deny, log, auditlog, status: 400, msg: 'host header is a numeric IP address ', severity: '2', id: '123'
Change
# SecRule REQUEST_HEADERS: Host "^ [\ d \.] + $ "" deny, log, auditlog, status: 400, msg: 'host header is a numeric IP address ', severity: '2', id: '123'

Removing the Mod_Security suite is not recommended, but it is also a solution.

Yum remove-y mod_security

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.