The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Where is the mod_qos configuration file?

Discussion in 'Security' started by craigedmonds, Feb 19, 2014.

  1. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    cPanel Access Level:
    Root Administrator
    Twitter:
    I am running WHM Server Version: Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips Apache mod_bwlimited/1.4 mod_qos/10.10

    I am having issues with mod_qos, just does not seems to be working like it is on my other other servers.

    Example Screenshot: - Removed -

    I would like to be able to edit the mod_qos config file and tweak it a bit but cant find it.

    Anyone know the path to it?
     
    #1 craigedmonds, Feb 19, 2014
    Last edited by a moderator: Apr 25, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Try adding the values to the /usr/local/apache/conf/includes/pre_main_global.conf file and rebuilding the Apache configuration file via:

    Code:
    /scripts/rebuildhttpdconf
    There is a Mod_QoS example on this document:

    How To Mitigate Slowloris Attacks

    Thank you.
     
  3. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    cPanel Access Level:
    Root Administrator
    Twitter:
    AHA, yes thats very useful. Going to try it now.

    - - - Updated - - -

    Okay, sorry for my ignorance.

    I do the following?

    1. open up /usr/local/apache/conf/includes/pre_main_global.conf (i did this and the file was empty)

    2. add these lines:

    <IfModule mod_reqtimeout.c>
    RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500
    </IfModule>

    3. run: /scripts/rebuildhttpdconf

    I also ran /scripts/restartsrv_apache.

    No change though, ip's still hitting the server a million miles an hour.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    651
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The document I provided was not intended to provide a solution for an attack on your server. It was simply to show you how to add custom Mod_QoS rules to your Apache configuration. Discussion of the attack you have reported is occurring in your other open thread.

    Thank you.
     
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    620
    Likes Received:
    6
    Trophy Points:
    18
    Little bit late, but i think this is helpfull information and was missing.

    i did not found any "qos" named config file in /usr/local/apache nor in /etc

    i think smartest way to configure it is to go to:
    WHM » Service Configuration » Apache Configuration » Include Editor >> "Pre VirtualHost Include" >> "All versions"

    and there paste that code
    <IfModule mod_qos.c>
    ...mod qos config lines from http://opensource.adnovum.ch/mod_qos/ ...
    </IfModule>
    example config lines: https://documentation.cpanel.net/di...+Attacks#HowToMitigateSlowlorisAttacks-ModQoS
     
    #5 postcd, Apr 25, 2015
    Last edited: Apr 25, 2015
Loading...

Share This Page