limit_req does not work

double nginx-forum at nginx.us
Wed Feb 22 20:16:15 UTC 2012


Nginx 1.1.15 does not block request if I use "try_files". This is my
markup (simplified):

nginx.conf:
http {
    limit_req_zone $binary_remote_addr  zone=zone1:32m  rate=2r/s;
    limit_req_zone $binary_remote_addr  zone=zone2:32m  rate=12r/m;
    server {
        location @backend {
            limit_req zone=zone1 burst=10;
            limit_req zone=zone2 burst=100 nodelay;
            [...]
            fastcgi_pass                   
unix:/var/run/fastcgi/dispatch.sock;
            [...]
        }
        location / {
            try_files $uri @backend;
            expires max;
        }
    }
}

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



More information about the nginx mailing list