2 messages in ru.sysoev.nginxwishlist: 'location + root' compatibl...
FromSent OnAttachments
Jonathan VanascoSep 23, 2006 12:27 pm 
Aleksandar LazicSep 23, 2006 12:40 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:wishlist: 'location + root' compatible with other webserver configurationsActions...
From:Jonathan Vanasco (ngin@public.gmane.org)
Date:Sep 23, 2006 12:27:02 pm
List:ru.sysoev.nginx

the nginx implementaiton of 'location'+'root' is very different from most other servers it would be very nice if there were a compatible option

nginx maps location to disk by using 'root' + the full url

most other webservers map 'location' to disk by replacing 'root' as the file root for the url up to the 'location' match, and then map the additional url parts onto that directory

ie:

server { root /usr/local/www/sites/nginx; }

nginx serves: url: http://127.0.0.1/wiki/nginx file: /usr/local/www/sites/nginx/wiki/nginx

but

server { root /usr/local/www/sites/nginx; location /wiki { root /usr/local/www/sites/nginx_wiki; } } nginx serves: url: http://127.0.0.1/wiki/nginx file: /usr/local/www/sites/nginx_wiki/wiki/nginx

url: http://127.0.0.1/wiki/nginx/abc file: /usr/local/www/sites/nginx_wiki/wiki/nginx/abc

" root + url"

most other webservers: url: http://127.0.0.1/wiki/nginx file: /usr/local/www/sites/nginx_wiki/

url: http://127.0.0.1/wiki/nginx/abc file: /usr/local/www/sites/nginx_wiki/abc

" root + ( url - location )"