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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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).
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
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.
I stopped testing mod_qos against MPM prefork binaries long time ago and don't know if everything works.