Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    112
    Likes Received:
    0
    Trophy Points:
    66
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 craigedmonds, Feb 19, 2014
    Last edited by a moderator: Apr 25, 2015
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,758
    Likes Received:
    1,886
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. craigedmonds

    craigedmonds Well-Known Member

    Joined:
    Oct 29, 2007
    Messages:
    112
    Likes Received:
    0
    Trophy Points:
    66
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,758
    Likes Received:
    1,886
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    694
    Likes Received:
    15
    Trophy Points:
    68
    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/display/EA/How+To+Mitigate+Slowloris+Attacks#HowToMitigateSlowlorisAttacks-ModQoS
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #5 postcd, Apr 25, 2015
    Last edited: Apr 25, 2015
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice