Install mod_security security module in Linux

Source: Internet
Author: User
Tags sql injection modsecurity

Install script:

Wget-o/tmp/modsecurity.sh-t 0 http://lnamp.yundaiwei.com/modsecurity/install.sh&&sh/tmp/modsecurity.sh

* Mod_security is a module of the Apache server that can effectively protect against SQL injection, XSS Cross-site, and other attack methods.
* Installation using the Mod_security module will increase CPU footprint, please pay attention to performance issues to make a choice.

* Rule file directory is:/usr/local/httpd/conf/modsecurity
* The configuration file path is:/usr/local/httpd/conf/extra/modsecurity.conf

* Close Mod_security method

Close only to a Web site:
In the site root directory, write the following to the. htaccess file

<ifmodule mod_security2.c>
Secruleremovebyid 0-99999999
</ifmodule>

All sites are closed:
Locate the following in the/usr/local/httpd/conf/httpd.conf file, comment or delete and restart httpd.

# mod_security
LoadModule Security2_module modules/mod_security2.so
LoadModule Unique_id_module modules/mod_unique_id.so
Includeoptional conf/extra/modsecurity.conf
Includeoptional conf/modsecurity/*.conf
* Note that using this module may result in a false seal. Beginners are not recommended for use.

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.