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 <[email protected]>wrote: > Good question! > > > On Tue, Aug 13, 2013 at 10:12 AM, Jaap van Arragon < > [email protected]> wrote: > >> Hello, >> >> 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 33.33.33.33 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? >> >> Thanks. >> >> Regards. >> Jaap >> >> >> _______________________________________________ >> nginx mailing list >> [email protected] >> http://mailman.nginx.org/mailman/listinfo/nginx >> > > > > -- > ------------------- > Pablo J. Villarruel / [email protected] > > _______________________________________________ > nginx mailing list > [email protected] > http://mailman.nginx.org/mailman/listinfo/nginx >
_______________________________________________ nginx mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx
