Anyway to limit amount of requests to no more then 20 requests per hour for each file?

Joseph Cabezas tdgh2323 at hotmail.com
Tue Jun 5 22:18:46 UTC 2012


Great....

So all I need is that single line in the httpd section, or server section?

limit_req_zone $uri zone=one:32m rate=1r/m;

Iam thinking I need some other line to actually apply the limit such as this?

location / {  limit_req   zone=one;  proxy_pass http://backend1; }


Or something like this?


Joseph



> From: ne at vbart.ru
> To: nginx at nginx.org
> Subject: Re: Anyway to limit amount of requests to no more then 20 requests	per hour for each file?
> Date: Wed, 6 Jun 2012 00:54:48 +0400
> 
> On Wednesday 06 June 2012 00:30:26 Joseph Cabezas wrote:
> > Hello,
> > 
> > Iam trying to avoid a seperate location {} for each file, instead just
> > limit the amount of reqeusts per second based on each object.
> > 
> 
> If you're happy with 60 requests per hour, then you can take advantage of
> the http_limit_req module.
> 
> http://nginx.org/en/docs/http/ngx_http_limit_req_module.html
> 
>   limit_req_zone $uri zone=one:32m rate=1r/m;
> 
>  wbr, Valentin V. Bartenev
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120605/7495b6a4/attachment.html>


More information about the nginx mailing list