Where is the mod_qos configuration file?

craigedmonds

Well-Known Member
Oct 29, 2007
115
1
68
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?
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

craigedmonds

Well-Known Member
Oct 29, 2007
115
1
68
Europe
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.
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

postcd

Well-Known Member
Oct 22, 2010
721
21
68
Little bit late, but i think this is helpfull information and was missing.

I would like to be able to edit the mod_qos config file and tweak it a bit but cant find it.
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
 
Last edited: