Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to disable mod security for a domain in cPanel  (Read 6334 times)

0 Members and 1 Guest are viewing this topic.

lijeshk

  • Guest
How to disable mod security for a domain in cPanel
« on: October 25, 2013, 04:29:25 pm »

To disable mod_security for a particular domain in cPanel, please do the following steps:

For Apache Version 1.x:

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

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


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