Menu

Getting Apache Errors After Installing and configuring MOD_QOS

2015-08-23
2020-10-05
  • Zak Hussain

    Zak Hussain - 2015-08-23

    Hi I am having some problem. I am new to mod_qos. I have installed it and i can see this module also loaded properly. Now trying to configure its options to stop bots to access my website constantly. I want to limit connections for per IP based.

    I am using:
    Apache 2.4.16
    Prefork
    Mod_QoS

    After sucessfull installation, I am getting some errors in error_log in /var/log/httpd.

    Errors are as follows:

    mod_ssl/2.4.16 compiled against Server: Apache/2.4.16, Library: OpenSSL/1.0.1k
    mod_qos(009): loaded MPM is 'prefork' but mod_qos should be used with MPM 'Worker' only.
    mod_qos(009): server version is 2.4 but mod_qos should be used with Apache 2.2 only.


    Is PREFORK not compatible with ModQoS?
    Can i not use modQoS with Apache 2.4?

    I have configured MOD_QOS with following parameter: (I copied this config from online and attched to my httpd.con file to test)

    <IfModule qos_module.so="">

    handle connections from up to 100000 different IPs

    QS_ClientEntries 100000

    allow only 50 connections per IP

    QS_SrvMaxConnPerIP 50

    limit maximum number of active TCP connections limited to 256

    MaxClients 256

    disables keep-alive when 180 (70%) TCP connections are occupied

    QS_SrvMaxConnClose 180

    minimum request/response speed (deny slow clients blocking the server, keeping connections open without requesting anything

    QS_SrvMinDataRate 150 1200
    </IfModule>

    Please someone help me here I will highly appreciate. My intention is to stop bots to access site and run queries on database and i found mod_qos is best solution for me but it looks like its quiet difficult to make it work.

     

    Last edit: Zak Hussain 2015-08-23
  • Pascal Buchbinder

    As mentioned in the documentation, mod_qos has been designed and tested for Apache 2.2 worker binaries. The QS_SrvMinDataRate directive has once been disabled for Apache 2.4 as it did not work with early version of the Apache 2.4 server. Further tests have shown that today (as of Apache 2.4.12) all directives of mod_qos should work and the QS_SrvMinDataRate has been enabled within source code repository. If further tests are successful, the next mod_qos version should be fully compatible with Apache 2.2 and 2.4 "worker" and "event" multi-processing module.
    However, I don't think you are requiring QS_SrvMinDataRate to *"stop bots from accessing your site" (you probably need to use other functions of mod_qos).

     
  • Zak Hussain

    Zak Hussain - 2015-09-01

    Thank you Pascal a lot for responding my query. I am using Apache 2.4.16. Does it mean I can use "prefork" module for mod_qos? Please advise. Thank you

     
  • Sreedhar

    Sreedhar - 2020-10-05

    I am using apache 2.4.29. I installed mod_qos last week and saw the same messge here which made me thinking. However I found it worked fine as mpm prefork. I tested it with QS Max connections per IP and also exclusion of an IP address.

     
    • Pascal Buchbinder

      I stopped testing mod_qos against MPM prefork binaries long time ago and don't know if everything works.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.