limit_req and @named locations

robw nginx-forum at nginx.us
Tue Sep 24 13:12:54 UTC 2013


Hi list

I am experiencing some problems with a rate-limiting setup.

I have a "global" limit_req declared in my http block.

I also have additional limit_req declarations in various locations, both
@named and unnamed, to provide proper protection to different backend
endpoints.

It seems that additional limit_req is working fine in unnamed locations, but
being ignored in @named locations.

I've linked to an example config exhibiting the problem:
https://gist.github.com/anonymous/bf347d5302b3463f970b

If I remove the limit_req in the http block, the @dynamic limit_req works
perfectly. If I enable limit_req in the http block, the @dynamic limit_req
is ignored. In both cases, the limit_req in the unnamed location works
perfectly!

Am I approaching this in the wrong way? How can I make limit_req work
properly in the @dynamic location?

thanks

Rob

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



More information about the nginx mailing list