Welcome! Log In Create A New Profile

Advanced

Re: PHP files being downloaded on condition

August 04, 2011 06:28AM
On Thu, Aug 04, 2011 at 04:33:30AM -0400, Samael wrote:
> Thanks for the suggestions, I will check how can I improve my
> configuration upon them. Unfortunately, they seem to be less generic (ie
> including specific paths) and so promote the probability of making
> errors.
>
> I'm wondering about the regex usage in location though - this is one of
> the things I like very much about nginx. Can you please elaborate the
> reasons for avoiding them?

The difference is how nginx processes location.

If you use only prefix or exact locations, then nginx looks up
the longest match nevertheless of order of locations in configuration file.
This allows you to have hundreds or thousands locations without worrying
how a new location will affect the existant configuration.

Regex locations depend on order, so during adding a new location
you have to look though whole configuration to see if the new location
will affect it.

A man thinks usually that he creates a small configuration with regexes
and it will work always fine. But configuration usually grows eventually
and at some point it become a difficult task to add new locations.

Rewrite rules aggravate this more.


--
Igor Sysoev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

PHP files being downloaded on condition

Samael August 02, 2011 01:35AM

Re: PHP files being downloaded on condition

Igor Sysoev August 02, 2011 02:26AM

Re: PHP files being downloaded on condition

Edho Arief August 02, 2011 02:28AM

Re: PHP files being downloaded on condition

Samael August 02, 2011 03:28AM

Re: PHP files being downloaded on condition

Igor Sysoev August 03, 2011 03:34PM

Re: PHP files being downloaded on condition

Samael August 04, 2011 04:33AM

Re: PHP files being downloaded on condition

Igor Sysoev August 04, 2011 06:28AM

Re: PHP files being downloaded on condition

Samael August 12, 2011 02:28PM

Re: PHP files being downloaded on condition

Igor Sysoev August 13, 2011 06:26PM

Re: PHP files being downloaded on condition

Samael August 14, 2011 12:25AM

Re: PHP files being downloaded on condition

Sharl.Jimh.Tsin August 14, 2011 02:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 286
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