Install mod_Security in Centos
Thursday, October 27th, 2011below is the steps to install Mod_security in Centos Linux server
1- # yum install mod_security
2- you should see the below
Loaded plugins: downloadonly, fastestmirror, priorities, protectbase Loading mirror speeds from cached hostfile * epel: www.gtlib.gatech.edu * base: mirror.skiplink.com * updates: centos.aol.com * addons: mirror.cs.vt.edu * extras: mirror.trouble-free.net 0 packages excluded due to repository protections Setting up Install Process Parsing package install arguments Resolving Dependencies --> Running transaction check ---> Package mod_security.x86_64 0:2.5.9-1.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================================== Package Arch Version Repository Size ============================================================================================================================================================== Installing: mod_security x86_64 2.5.9-1.el5 epel 935 k Transaction Summary ============================================================================================================================================================== Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 935 k Is this ok [y/N]: y Downloading Packages: mod_security-2.5.9-1.el5.x86_64.rpm | 935 kB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : mod_security [1/1] Installed: mod_security.x86_64 0:2.5.9-1.el5 Complete!
vi /etc/httpd/modsecurity.d/modsecurity_crs_10_config.conf
make sure this is oneSecRuleEngine Onservice httpd restarttail -f /var/log/httpd/error_logsimple out put[Sat May 09 23:18:31 2009] [notice] caught SIGTERM, shutting down [Sat May 09 23:18:33 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Sat May 09 23:18:34 2009] [notice] ModSecurity for Apache/2.5.9 (http://www.modsecurity.org/) configured. [Sat May 09 23:18:34 2009] [notice] Original server signature: Apache/2.2.3 (CentOS) [Sat May 09 23:18:34 2009] [notice] Digest: generating secret for digest authentication ... [Sat May 09 23:18:34 2009] [notice] Digest: done [Sat May 09 23:18:35 2009] [notice] Apache/2.2.0 (Fedora) configured -- resuming normal operationsThank you