Execution order of HttpLimitReq, proxy_pass and rewrites

j0nes2k nginx-forum at nginx.us
Wed Mar 30 17:28:04 MSD 2011


I have tried to rate limit a resource using HttpLimitReq that is passed
on to a backend Apache server. Now when I try to limit this resource,
nothing is blocked and all requests go through. When using static
resources, the limit_req works as expected. Here is my config: 

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

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

I think this might be related to the execution order or these modules.
Which of the commands limit_req and proxy_pass is evaluated first? How
can I limit the access to resources in a backend server?

Thank you for your help!

Best regards,
Jonas Kaufmann

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,186876,186876#msg-186876

More information about the nginx mailing list