wishlist: 'location + root' compatible with other webserver configurations

Jonathan Vanasco nginx at 2xlp.com
Sat Sep 23 23:27:25 MSD 2006


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 )"


		
	





More information about the nginx mailing list