Limiting gzip_static to two directories.

B.R. reallfqq-nginx at
Sat Jan 17 10:38:56 UTC 2015

According to the location
directive documentation, nginx will match one location block only.
nginx will first match the longest prefix location to your request.
If that longest prefix is the one you provided, then regular expression
won't be checked, as you used the special modifier doing that.
If that longest prefix is another location rule, then nginx will remember
it, search for regex locations matches, stop at the first one matching or
revert back to the longest prefix lcoation found earlier.

So, if you have no longer prefix location matching those URIs, then the
files will be served by it.
*B. R.*

On Sat, Jan 17, 2015 at 1:14 AM, tommygunner <nginx-forum at> wrote:

> changing location line to:
> location ^~ /media/po_compressor/ {
> should allow it to look for all files within this directory and
> sub-directories, right?
> Posted at Nginx Forum:
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list