"root" directive weirdness
Cliff Wells
cliff at develix.com
Fri Jan 22 09:14:22 MSK 2010
On Fri, 2010-01-22 at 05:15 +0200, Marcus Clyne wrote:
> Cliff Wells wrote:
> > On Fri, 2010-01-22 at 02:45 +0200, Marcus Clyne wrote:
> >
> >>>
> >>>
> >> but using
> >>
> >> location ^~ /users/ {
> >> root /web;
> >> }
> >>
> >> is more efficient than using
> >>
> >> location /users {
> >> root /web;
> >> }
> >>
> >
> >
> > That's not true. The regex is less efficient.
> >
> It's not a regex (regexes are indicated by ~*). It's a test for the URL
> beginning with the represented string. If found, it does not test any
> regexes. Using just
>
> location /users
>
> will test regexes before returning the /users location if no regexes match.
I stand corrected. I should have read the documentation you so
thoughtfully linked to =)
Regards,
Cliff
More information about the nginx
mailing list