This tutorial is only for the CWP version 0.1 to 0.7, in the newer version you can install it with one click from the panel
=======================================================================
ModSecurity operates embedded into the web server (httpd/apache), acting as a powerful IPS - shielding web applications from attacks
If you have CWP installed than you can install Mod Security and rules with one click from Security menu in CWP.
Install Mod_Security
yum install mod_security git
cd /etc/httpd/
git clone https://github.com/SpiderLabs/owasp-modsecurity-crs.git
mv owasp-modsecurity-crs modsecurity-crs
cd modsecurity-crs
cp modsecurity_crs_10_setup.conf.example modsecurity_crs_10_config.conf
Now add config to end of file: /etc/httpd/conf/httpd.conf
<IfModule security2_module>
Include modsecurity-crs/modsecurity_crs_10_config.conf
Include modsecurity-crs/base_rules/*.conf
</IfModule>
That is it, do not forget to restart server
service httpd restart
Check logs if mod_security works
/var/log/httpd/error_log
mod_security configuration files
/etc/httpd/conf.d/mod_security.conf - main configuration file for the mod_security Apache module.
/etc/httpd/modsecurity-crs/ - all other configuration files for the mod_security Apache.
/etc/httpd/modsecurity-crs/modsecurity_crs_10_config.conf - Configuration contained in this file should be customized for your specific requirements before deployment.
/var/log/httpd/modsec_debug.log - Use debug messages for debugging mod_security rules and other problems.
/var/log/httpd/modsec_audit.log - All requests that trigger a ModSecurity events (as detected) or a server error are logged ("RelevantOnly") are logged into this file.
*Any change made requires Apache restart
service httpd restart