I haven't seen this thread accurately described on this site yet, so I'm going to do my best to explain exactly what I did to get this to work effectively on my server with the variety of regular sites, forum sites (vB, IPB, PHPbb, etc.), including ClamAV, while using cPanel WHM. Hopefully this helps all of you.
First thing to know is that the rules are default in nature, so if you think you can just follow the easy instructions and apply all of them and everything will work perfectly ---- it won't... You need to be able to tweak the rules for your environment. Because my server environment is so flexible in regards to the types of sites I host, I have tweaked some of these rules, and they now work excellently.
Ok first make these folders in /usr/local/apache:
Now open /usr/local/apache/conf/httpd.conf and add these Include lines and do not restart httpd yet:
Now download these rules which have been optimized as I stated above to work with LSWS in multiple environments without compromising security.
Click Here To Download The Optimized Mod_Security Rules
If a moderator / admin could attach these rules it would be helpful.
Now open the .zip file and go into each folder and simply drag and drop those files to their corresponding folders in /usr/local/apache (modsecurity or modsecurity.d).
NOW RESTART HTTPD
Everything should work fine for all environments. Keep in mind there is one file in here that you should remove IF YOU DO NOT HAVE CLAMAV installed on your server. Remove the 05_asl_scanner.conf file in the modsecurity.d folder or it could trigger errors.
Regards,
Ant
First thing to know is that the rules are default in nature, so if you think you can just follow the easy instructions and apply all of them and everything will work perfectly ---- it won't... You need to be able to tweak the rules for your environment. Because my server environment is so flexible in regards to the types of sites I host, I have tweaked some of these rules, and they now work excellently.
Ok first make these folders in /usr/local/apache:
Now open /usr/local/apache/conf/httpd.conf and add these Include lines and do not restart httpd yet:
Now download these rules which have been optimized as I stated above to work with LSWS in multiple environments without compromising security.
Click Here To Download The Optimized Mod_Security Rules
If a moderator / admin could attach these rules it would be helpful.
Now open the .zip file and go into each folder and simply drag and drop those files to their corresponding folders in /usr/local/apache (modsecurity or modsecurity.d).
NOW RESTART HTTPD
Everything should work fine for all environments. Keep in mind there is one file in here that you should remove IF YOU DO NOT HAVE CLAMAV installed on your server. Remove the 05_asl_scanner.conf file in the modsecurity.d folder or it could trigger errors.
Regards,
Ant
Last edited: