Limit connection to specific location
Valentin V. Bartenev
vbart at nginx.com
Tue Aug 13 19:09:43 UTC 2013
On Tuesday 13 August 2013 17:12:11 Jaap van Arragon 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 18.104.22.168 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?
You can try to use the limit_req module:
But the minimum limit you can currently set is 1 request per minute.
wbr, Valentin V. Bartenev
More information about the nginx