Welcome! Log In Create A New Profile

Advanced

Re: Limiting gzip_static to two directories.

B.R.
January 17, 2015 05:42AM
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@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@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Limiting gzip_static to two directories.

tommygunner January 16, 2015 06:56PM

Re: Limiting gzip_static to two directories.

tommygunner January 16, 2015 07:14PM

Re: Limiting gzip_static to two directories.

B.R. January 17, 2015 05:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 183
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready