Limit connection to specific location
farseas at gmail.com
Tue Aug 13 17:23:15 UTC 2013
One dirty way to do it would be to use a program to monitor the connections
that access that location and then, when 20 connections in an hour have
occurred, have the config file swapped out and replaced with another that
does not have that location block. There is a way to get Nginx to reread
it's config file without shutting it down.
Have cron restart the whole sequence again every hour. You are using
Linux/Unix I hope.
Like I said, it's a dirty but relatively easy solution.
On Tue, Aug 13, 2013 at 11:53 AM, Pablo J. Villarruel <pablo at libo.com.ar>wrote:
> Good question!
> On Tue, Aug 13, 2013 at 10:12 AM, Jaap van Arragon <
> j.vanarragon at lukkien.com> wrote:
>> I'am looking for a way to limit the number of connection in one hour to a
>> location named /api/
>> I've looked at the ngx_http_limit_conn_module module but I don't
>> understand how to limit the amount of connection from a specific
>> ip address per hour.
>> For example: ip address 126.96.36.199 can only make 20 connections in one
>> hour to the url /api/
>> We use nginx as a loadbalancer/proxy.
>> Does somebody has a example for this?
>> nginx mailing list
>> nginx at nginx.org
> Pablo J. Villarruel / pablo at libo.com.ar
> nginx mailing list
> nginx at nginx.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nginx