How to disable Mod_Sec for a specific domain in cPanel

How to disable Mod_Sec for a specific domain in cPanel

Here is how to disable mod_sec for a single domain name in cPanel.

To disable mod_security COMPLETELY, add the following line to the .htaccess file

SecFilterEngine Off

To only disable HTTP POST scanning, use the following instead:

SecFilterScanPOST Off

On a not-cPanel configuration you can add the following to Apache’s virtual host file (/usr/local/apache/conf/httpd.conf):

<IfModule mod_security2.c>
SecRuleEngine off
</IfModule>

If you want to disable mod_sec for a single file/folder instead, you can follow this guide here.

whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.