#1 (permalink)  
Old 02-03-2008, 03:34 PM
Registered User
 
Join Date: Aug 2004
Posts: 139
screege is on a distinguished road
Disbale mod security for 1 site

Hi I am using apache 2.2 and mod security 2 with the default configs, my problem is that one site is using a php to call a jpg image but mod security keeps blocking it, I wanted to add the SecFilterEngine off to the htacess file but everytime I do it I get 500 internal server error for the whole site. Is there a way to disable mod security just for this site?

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-04-2008, 12:34 PM
Registered User
 
Join Date: Aug 2007
Location: Toronto, Canada
Posts: 32
s.a. is on a distinguished road
Edit httpd.conf and add the following into site VirtualHost entry:

<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-05-2008, 07:46 AM
Registered User
 
Join Date: Aug 2004
Posts: 139
screege is on a distinguished road
Thanks a lot it works like a charm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-05-2008, 03:29 PM
Registered User
 
Join Date: Oct 2005
Posts: 7
elevenx is on a distinguished road
This may get lost after cpanel updates. Please see the link below:

How to disable mod_security2 rule for one domain?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-19-2009, 10:40 AM
Registered User
 
Join Date: Aug 2004
Posts: 139
screege is on a distinguished road
After a while I have added the rule and now it doers not seem to work can anyone help me please? I addedd to one of my vhosts
<IfModule mod_security.c>
SecRuleEngine Off
</IfModule>

on /etc/httpd/conf/httpd.conf restarted apache but it is not working should I put in another place?

THANKS
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 09-19-2009, 10:54 AM
Registered User
 
Join Date: Aug 2004
Posts: 139
screege is on a distinguished road
Ok found the new code just put it in /etc/httpd/conf/httpd.conf before the </virtualhost> of the domain you want to disable it:

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

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 09-19-2009, 12:46 PM
Spiral's Avatar
Registered User
 
Join Date: Jun 2005
Location: Area 51
Posts: 1,501
Spiral is on a distinguished road
Exclamation

Blindly turning off mod_security entirely, even for one site, just because a rule triggers is for lack of a better word "stupid" to say the very least!

Don't turn off mod_security as that utterly defeats the point of having mod_security setup on your server in the first place! Subsequently, disabling one site leaves enough of a hole that the whole entire server may as well not have mod_security installed or enabled and may as well remove it entirely!

If you have a problem with a rule triggering, I suggest either rewrite the specific rule so that it doesn't trigger for that specific site or content or disable the offending rule (did you know you can disable individual rules?) and just that rule only --- leaving the rest of mod_security fully running!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:55 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc