"root" directive weirdness
Marcus Clyne
ngx.eugaia at gmail.com
Fri Jan 22 06:15:31 MSK 2010
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.
Marcus.
More information about the nginx
mailing list