"root" directive weirdness

Cliff Wells cliff at develix.com
Fri Jan 22 02:07:32 MSK 2010


On Thu, 2010-01-21 at 22:10 +0100, Dennis J. wrote:
> Hi,
> I'm trying to configure a vhost where in the default case I want it to get 
> the files from /opt/nginx/html but when the uri starts with "/users/" I 
> want to to deliver the files from /web/users/ instead:
> 
>          location / {
>              root   /opt/nginx/html;
>              index  index.html index.htm;
>          }
> 
>          location ~* ^/users/ {
>              root   /web/users;
>              rewrite ^/users(/.*) $1 last;
>          }

location / {
    root /opt/nginx/html;
    index index.html index.htm;
}

location /users {
    root /web;
}

Cliff

-- 
http://www.google.com/search?q=vonage+sucks




More information about the nginx mailing list