correct usage of location context?

Cliff Wells cliff at develix.com
Fri Jun 12 21:54:28 MSD 2009


On Fri, 2009-06-12 at 18:23 +0100, lejeczek wrote:
> would not it be a trailing(redundant) slash in location statement? - 
> location /test

Also his root settings are wrong:

location /test {
   root  /var/www;
}

Cliff

> Szymon Polom wrote:
> > I'm trying to shift my nginx instance from a multi-subdomain-setting 
> > to a one-domain-setting. I have the following config in the same 
> > server context:
> >
> > location /redmine/ {
> >  root /var/www/redmine/public;
> >  passenger_enabled on;
> > }
> >
> > location /test/ {
> >  root /var/www/test;
> >  autoindex on;
> > }
> >
> > location / {
> >  root /var/www/main;
> >  autoindex on;
> > }
> >
> > When I try to access http://example.com/test/testfile, nginx tries to 
> > read the file at /var/www/test/test/testfile instead of at 
> > /var/www/test/testfile. I guess my configuration is not correct; how 
> > can I force nginx to e.g.
> >
> > serve everything beginning with /redmine/
> > from /var/www/redmine/public
> >
> > ?
> >
> > Any help would be appreciated.
> >
> >
> 
-- 
http://www.google.com/search?q=vonage+sucks






More information about the nginx mailing list