Limiting gzip_static to two directories.

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


According to the location
<http://nginx.org/en/docs/http/ngx_http_core_module.html#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 nginx.us> 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:
> http://forum.nginx.org/read.php?2,256154,256155#msg-256155
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150117/7f9b56c4/attachment-0001.html>


More information about the nginx mailing list