Mod_qos Directives Not Recognized
Earlier today I recompiled Apache to include mod_qos to deal with some traffic/load problems.
Build and install went uneventful. mod_qos is showing up in Apache Status, build info, and adding /qos (not exact syntax) as describe in documentation indicates to mod_qos is running properly.
However, I've been utterly unsuccessful in configuring any of the directives to configure mod_qos. After searching much of the web, it seemed that the appropriate way on cPanel is to use 'Apache Configuration' edit the includes and add directives to pre-main global include.
However, anytime I add any mod_qos related directive it fails with a parser error that the directive is not recognized. I've tried multiple, including 'QS_LogOnly on' by itself. No luck.
If I enclose the directives with the include file parses fine, but none of the directives appear to be executing. Clearly the resolves to false and simply skips them.
I must be missing some obvious and stupid step. How can it be that mod_qos is running yet doesn't seem to be loaded or active from a configuration point of view?
Here's one of the iterations of initial rules I tried (not the final set, I was just starting to get to test what might work).
# Observe mode only for now
QS_LogOnly on
# Default Request Limit 50 per site, per IP 20, no keep alive after 10
QS_LocRequestLimitDefault 50
QS_SrvMaxConnPerIP 20
QS_SrvMaxConnClose 70
# limit number of logins to 5 every 10min
QS_ClientEventBlockCount 20
SetEnvIf Request_URI /wp-login.php$ QS_Block=4
# Setup UA specific rules
BrowserMatch "slurp" QS_Cond=spider
BrowserMatch "googlebot" QS_Cond=spider
QS_CondLocRequestLimitMatch "^.*$" 5 spider
-
Tried to edit to include version info, but wouldn't let me. This is a Hostgator VPS, CentOS 6.6, WHM 11.50, Apache 2.2, mod_qos 11.5 0 -
Do you see it here? httpd -l | grep -i qos
Also you have to enable UniqueId in Exhaustive Options List, you can check if you have it from here:httpd -l | grep unique0 -
Do you see it here?
httpd -l | grep -i qos
Also you have to enable UniqueId in Exhaustive Options List, you can check if you have it from here:httpd -l | grep unique
qos does not, but unique does: root@online [~]# httpd -l | grep -i qos root@online [~]# httpd -l | grep -i unique mod_unique_id.c root@online [~]#0 -
After more careful inspection of the compiled httpd.conf, it appears that the loadModule line is after the pre_main_global. So directives included in that pre_main_global conf wouldn't see the mod_qos module. Moving the directive into the pre_virtual_host_global include fixed it and it is now running. I thought I had tried that before, but maybe not. All good in the end. Thanks for the input and pointing me in the right direction. 0 -
So glad you got it working, I'm sorry I didn't receive an alert with your previous reply. You welcome :) 0 -
Moving the directive into the pre_virtual_host_global include fixed it and it is now running.
Hello :) I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.0
Please sign in to leave a comment.
Comments
6 comments