Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2009
    Posts
    32

    Turn off mod_security for a site

    How can turn off mod_security rules just for a website?

  2. #2
    Hi,

    It depends on the Mod Security version you have on the server. If it's modsec 1, then you can add the below lines in the .htaccess file of your domain:

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

    If it's modsec 2, you can add the following lines in the VirtualHost entry of the domain in the Apache configuration file:

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

    Make sure you restart the httpd service once you add the modsec2 rule in the apache configuration.

  3. #3
    Join Date
    Aug 2009
    Posts
    32
    Thank you very much.
    Is it posible with .htaccess too?

  4. #4
    Join Date
    May 2008
    Location
    Cochin
    Posts
    122
    yes, Add those entry to the .htaccess file and it will skip the mod-security rules for only that domain.

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

  5. #5
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    1,683
    It's better to just turn off the one specific rule that is giving problems, rather than turning mod_security off altogether which is kind of leaving the front door wide open for problems down the track ...

  6. #6
    Join Date
    May 2009
    Posts
    31
    Yes.. it is better to turn off specific rules causing the problem rather than disabling mod_security server or domain wide..

  7. #7
    You can manage most of the main mod_security settings from a .htaccess file, so you can control it down to per-domain, per-directory and per file basis by switching off individuals rules.
    Support Facility | 24/7 web hosting technical support services
    Technical support | Server management | Data migration

    Technical Articles

  8. #8
    Adding mod security rules to htaccess may be better because when you migrate the account to another server, the setting remains at the destination as well. Also you can turn it off or on anytime without requiring the help of your host if you are on shared hosting.
    Windows VPS | Linux Hybrid Server | 99.9% Uptime
    http://www.odishahosting.com ( USA DC)
    http://www.odishahosting.in ( INDIA DC)

  9. #9
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    You can disable a single rule as follows.

    Code:
    <IfModule mod_security.c>
    SecFilterCheckURLEncoding Off
    </IfModule>
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  10. #10
    Join Date
    Sep 2007
    Posts
    368

Similar Threads

  1. turn a jpg into a site?
    By darkeden in forum Web Design and Content
    Replies: 15
    Last Post: 05-09-2009, 04:33 PM
  2. Best mod_security rules site?
    By TonyB in forum Hosting Security and Technology
    Replies: 8
    Last Post: 05-01-2008, 09:24 AM
  3. how to turn off safe modefor some site
    By vietkool in forum Hosting Software and Control Panels
    Replies: 8
    Last Post: 09-07-2005, 03:09 PM
  4. How did my site turn out?
    By RoboHostCo in forum Web Site Reviews
    Replies: 12
    Last Post: 10-13-2004, 08:36 PM
  5. What do you think of Site Turn Web Hosting?
    By nesnas in forum Web Hosting
    Replies: 0
    Last Post: 12-09-2001, 02:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •