Hello! I cannot figure out how to apply a rate limit *only to static files* served with try_files (and not for @app location). Is it possible?
Here's my configuration: limit_req_zone $binary_remote_addr zone=mylimit:10m rate=2r/s; server { listen 80; server_name example.com; # serve the static file directly if it exists in the public Rails folder... try_files $uri @app; location @app { # ... otherwise send the request to the Rails application proxy_pass http://app; proxy_redirect off; } } I know that I can use the following: limit_req zone=mylimit burst=50 nodelay; However where should I put that line? If I put it in the "server", then also my @app will use that settings, which is not what I want... I just want to put a limit specific for files served using try_files. Note that static files can be in any location, even the root folder (e.g. /favicon.ico and many others). Any help would be greatly appreciated Thanks Marco Colli
_______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx