Disable mod security for a domain in cPanel





For Apache Version 1.x:

Add the following directive in .htaccess file and copy it in to the document root directory of domain:

   <IfModule mod_security.c>
   SecFilterEngine Off
   SecFilterScanPOST Off
   </IfModule>

For Apache Version 2.x:

Create a directory for that domain under Apache conf directory as:

   mkdir -p   /usr/local/apache/conf/userdata/std/2/username/domainname

Then create a mod_security conf file:

   touch /usr/local/apache/conf/userdata/std/2/username/domainname/mod_security.conf

Add the following directive(s) in mod_security.conf file:

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

Save the file and then run:
    
   /scripts/ensure_vhost_includes –user=username

--

No comments:

Post a Comment