I need to implement a limit number of connections to the URL's by mask (^/url/) not per one second, but per 10 seconds to 3. Is it possible with mod_qos? Can you give an example of config?
And one more question, does the mod_qos changes HTTP headers sent to Apache, like nginx write client IP address to X-Real-IP or X-Forwarded-For?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can use QS_LocRequestLimitMatch to limit the number of concurrent requests allowed for a predefined URL pattern.
QS_LocRequestLimitMatch^/en/10
But this creates only one single counter which counts every request to an URL matching the provided regular expression.
If you need a separate counter for each URL, you would have to configure separate rules (which means that at least part of the dynamic URL must be already known in advance).
sir again you are getting mistake, i dont have only one URL. i have 200-300
URLs. So adding each of them is very hard for me. Cann't we add some rule ?? that will work for any url. As i said earlier the URLs are dynamic.
Aha, I was not sure what you really intended to configure (does not really fit this discussion - it's not really related to this topic here).
So you would need a rule which limits the number of "the very same" requests: check, how many other requests are accessing the server using the same URL, e.g. by iterating through the scoreboard, right?
No, that's currently not possible.
And I don't understand the benefit of such a rule.
Last edit: Pascal Buchbinder 2020-03-04
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i think i am not able to express my question clear to you. See it's just i
don't want limit over IP but over the URLs.I mean it should work for any
URL from the server.
Aha, I was not sure want you really intended to configure (does not really
fit this discussion - not really related to this topic here).
So you would need a rule which limits the number of "the very same"
requests: check, how many other requests are accessing the server using the
same URL, e.g. by iterating through the scoreboard.
No, that's currently not possible.
And I don't understand the benefit of such a rule.
Hi,
I need to implement a limit number of connections to the URL's by mask (^/url/) not per one second, but per 10 seconds to 3. Is it possible with mod_qos? Can you give an example of config?
And one more question, does the mod_qos changes HTTP headers sent to Apache, like nginx write client IP address to X-Real-IP or X-Forwarded-For?
Thanks.
Eaxmple:
mod_qos may set headers using http://opensource.adnovum.ch/mod_qos/#QS_SetReqHeader
but you might also want to have a look at those resources:
my objective is a little bit different. I have dynamic URL from server. And i want to limit each URL only 8 connections.
but still it's only working for the 1st URL only not for the 2nd or others. Also i woould like to donate where i can do that ??
You can use QS_LocRequestLimitMatch to limit the number of concurrent requests allowed for a predefined URL pattern.
But this creates only one single counter which counts every request to an URL matching the provided regular expression.
If you need a separate counter for each URL, you would have to configure separate rules (which means that at least part of the dynamic URL must be already known in advance).
Last edit: Pascal Buchbinder 2020-02-27
Soory but this is not working
if i use only
QS_EventRequestLimit ^/en/ 10
it did not work
but if use
the above works.
now i would like to explain my URL
i have following types of URL
http://xx.xx.x.x/en/t8vm81ky3ob3-65881-2/1.rar ==> this should be 10 connect, no IP limit
http://xx.xx.x.x/en/at49yfx31nyq-75317-2/2.rar ==> this should be 10 connect, no IP limit but every URL
Ah I'm sorry
I used QS_LocRequestLimitMatch in the text but the wrong directive in the example
I updted may comment above.
If 1.rar and 2.rar are known file names, you could configure
sir again you are getting mistake, i dont have only one URL. i have 200-300
URLs. So adding each of them is very hard for me. Cann't we add some rule ?? that will work for any url. As i said earlier the URLs are dynamic.
Last edit: Amanullah Khan 2020-02-27
Aha, I was not sure what you really intended to configure (does not really fit this discussion - it's not really related to this topic here).
So you would need a rule which limits the number of "the very same" requests: check, how many other requests are accessing the server using the same URL, e.g. by iterating through the scoreboard, right?
No, that's currently not possible.
And I don't understand the benefit of such a rule.
Last edit: Pascal Buchbinder 2020-03-04
i think i am not able to express my question clear to you. See it's just i
don't want limit over IP but over the URLs.I mean it should work for any
URL from the server.
On Thu, 27 Feb 2020 at 22:55, Pascal Buchbinder pbuchbinder@users.sourceforge.net wrote: