Execution order of HttpLimitReq, proxy_pass and rewrites

Francis Daly francis at daoine.org
Wed Mar 30 17:42:20 MSD 2011


On Wed, Mar 30, 2011 at 09:28:04AM -0400, j0nes2k wrote:

Hi there,

A general rule of nginx is that one request is handled by one location
block. Only the configuration in, or inherited by, that location matters.

(An internal redirect counts as a new request, more or less.)

> when I try to limit this resource,
> nothing is blocked and all requests go through. 

> location /cgi-bin/test\.pl {	
> 	limit_req zone=one nodelay burst=3;
> }

There is a limit_req in this location.

> location /cgi-bin/ {
>      proxy_pass         http://default_backend/cgi-bin/;
> }

There's no limit_req in this location.

Does that (indirectly) answer your question?

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list