Disable Mod Security for a specific domain

If Apache is compiled with SuPhp and Mod Security, do the following:

Create a directory for that domain:

mkdir -p /usr/local/apache/conf/userdata/std/2/USERNAME/DOMAIN.TLD
Then create a mod_security conf file:

touch /usr/local/apache/conf/userdata/std/2/USERNAME/DOMAIN.TLD/mod_security.conf
Using your favorite Linux Text editor such as pico or vi, add the following directive(s) in that file:

<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
Save the file and then run:

/scripts/ensure_vhost_includes –user=USERNAME 
 If Apache is NOT compiled with SuPhp and Mod Security, do the following:

You can implement one of the following two options:

1. Add the following directive in .htaccess file:

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
If that didn’t work on your server ,

2. SSH to the server and add the following directive to /etc/httpd/conf/httpd.conf file:

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

  • 0 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

The password you provided is not correct. Trace Output: (root@***.***.***.***’s password: ==sshcontroloutput== sshcmdpermissiondeny

The above error troubles you sometimes while doing multiple transfer via Cpanel to Cpanel server,...

Fantastico is not installed at the default location

Today while installing fantastico on one of our server, We came across the following error....

Compress CPanel Domlogs log files

Before setting up compression of your logs you will want to have cpanel run the stats as often as...

Phpmyadmin failed (Cpanel) Warning: session_start() [function.session-start]: SQLite

Phpmyadmin fails to load and gives the below error. ==== Error ==== Warning: session_start()...

Found suspicious scripts in /tmp directory

Sometimes its very frustating to find how the suspicious files are stored in /tmp directory....