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!

Mod_qos Directives Not Recognized

Discussion in 'EasyApache' started by allklier, Jul 29, 2015.

  1. allklier

    allklier Member

    Joined:
    Jul 29, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New York, NY
    cPanel Access Level:
    Root Administrator
    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 <Location> /qos <Location> (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 <IfModule mod_qos.c> the include file parses fine, but none of the directives appear to be executing. Clearly the <IfModule> 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).

    <IfModule mod_qos.c>
    # 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
    </IfModule>
     
  2. allklier

    allklier Member

    Joined:
    Jul 29, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New York, NY
    cPanel Access Level:
    Root Administrator
    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
     
  3. ModServ

    ModServ Well-Known Member

    Joined:
    Oct 17, 2006
    Messages:
    332
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    Do you see it here?
    Code:
    httpd -l | grep -i qos
    Also you have to enable UniqueId in Exhaustive Options List, you can check if you have it from here:
    Code:
    httpd -l | grep unique
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. allklier

    allklier Member

    Joined:
    Jul 29, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New York, NY
    cPanel Access Level:
    Root Administrator
    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 [~]#
     
  5. allklier

    allklier Member

    Joined:
    Jul 29, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New York, NY
    cPanel Access Level:
    Root Administrator
    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.
     
  6. ModServ

    ModServ Well-Known Member

    Joined:
    Oct 17, 2006
    Messages:
    332
    Likes Received:
    5
    Trophy Points:
    168
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    So glad you got it working, I'm sorry I didn't receive an alert with your previous reply.

    You welcome :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,633
    Likes Received:
    1,787
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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