Board index Cpanel / WHM Mod_Security

How to disable mod_security for a domain

Postby gautham » Fri Jul 13, 2012 2:16 pm

How to disable mod_security for a domain in cpanel servers.
vi /usr/local/apache/conf/modsec2.user.conf

On top of that file insert the below rule
SecRule SERVER_NAME "domain.com" phase:1,nolog,allow,ctl:ruleEngine=off
Gautham G
WebhostingDevelopment.com
gautham
 
Posts: 14
Joined: Sun Jul 01, 2012 10:32 am

Re: How to disable mod_security for a domain

Postby a24uall » Tue Jul 31, 2012 11:00 am

Another method is to add the below code under the domains virtual host entry in httpd.conf

vi /usr/local/apache/conf/httpd.conf

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


Example of a httpd conf in which the above code is added

<VirtualHost 73.25.35.159:80>
ServerName domain.com
ServerAlias http://www.domain.com
DocumentRoot /home/user/public_html
ServerAdmin [email protected]
## User arun # Needed for Cpanel::ApacheConf
<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
Arun
WebhostingDevelopment.com
a24uall
Site Admin
 
Posts: 166
Joined: Sun Jul 01, 2012 9:07 am


Return to Mod_Security

Who is online

Users browsing this forum: No registered users and 2 guests


cron