Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    2

    Default mod_security nightmares

    mod_security is giving me 406 errors with /mail, /cpanel, and /whm. any ideas people?
    All help appreciated.

  2. #2
    Member AnilR's Avatar
    Join Date
    Nov 2007
    Location
    India
    Posts
    28

    Default

    If you are using Apache web server then mod_security can be disabled by adding following two lines within the .htaccess file in Apache web root directory like for cPanel in /home/user/public_html.
    If it does not exist then create a new file named .htaccess and add the code:


    SecFilterEngine Off
    SecFilterScanPOST Off

    But I would recommend you to remove and uninstall mod_security. You an just comment out or delete the related mod_security entries from httpd.conf Apache configuration file.
    Regards,
    Aneel

  3. #3
    nat
    nat is offline
    Member
    Join Date
    Jan 2003
    Posts
    210

    Default

    Quote Originally Posted by AnilR View Post
    If you are using Apache web server then mod_security can be disabled by adding following two lines within the .htaccess file in Apache web root directory like for cPanel in /home/user/public_html.
    If it does not exist then create a new file named .htaccess and add the code:

    SecFilterEngine Off
    SecFilterScanPOST Off
    That no longer works with mod_security2

  4. #4
    Member duranduran's Avatar
    Join Date
    Apr 2004
    Posts
    198

    Default

    I have the same problem. How can i disable mod_secure for one single domain ?

  5. #5
    nat
    nat is offline
    Member
    Join Date
    Jan 2003
    Posts
    210

    Default

    Step 1: Create a directory

    Code:
    mkdir -p /usr/local/apache/conf/userdata/std/2/username/domain.com
    Replace "username" with the domain's username

    Replace "domain.com" with the domain name




    Step 2: Add an include file for that domain

    1. Run:

    Code:
    nano /usr/local/apache/conf/userdata/std/2/username/domain.com/mod_security2.conf
    Replace "username" with the domain's username

    Replace "domain.com" with the domain name


    2. Add the following code to mod_security2.conf:

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

    3. Save and Exit nano




    Step 3: Run the following to add that include file for that particluar domain to httpd.conf

    Code:
    /scripts/ensure_vhost_includes --user=username
    Replace "username" with the domain's username




    Step 4: If step 3 doesn't restart apache, restart apache.

    Run:

    Code:
    /sbin/service httpd restart

Similar Threads & Tags
Similar threads

  1. AOL RLY IR Nightmares!
    By 4u123 in forum E-mail Discussions
    Replies: 8
    Last Post: 08-23-2007, 09:25 AM
  2. Oepnvz/Cpanel install nightmares
    By brybert in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-30-2006, 07:24 PM
  3. Frontpage support nightmares
    By rs-freddo in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-06-2005, 01:54 PM
  4. NIGHTMARES! just backed up but ips not assigning
    By rockster in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-06-2004, 12:46 PM
  5. Please help me! MySQL database restoration nightmares!
    By Ganga in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-17-2003, 04:55 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube