Cache only static files in sub/subfolder but not sub

JoakimR nginx-forum at
Mon Feb 20 12:52:10 UTC 2017

Found the answer to my question here

"If a location is defined by a prefix string that ends with the slash
character, and requests are processed by one of proxy_pass, fastcgi_pass,
uwsgi_pass, scgi_pass, or memcached_pass, then the special processing is
performed. In response to a request with URI equal to this string, but
without the trailing slash, a permanent redirect with the code 301 will be
returned to the requested URI with the slash appended. If this is not
desired, an exact match of the URI and location could be defined like this"

Posted at Nginx Forum:,272506,272523#msg-272523

More information about the nginx mailing list