correct usage of location context?
Rob Schultz
rschultz7 at gmail.com
Sat Jun 13 05:35:26 MSD 2009
> 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;
> }
>
To deploy passanger app onto a sub uri then you might wish to look
into this
http://modrails.com/documentation/Users%20guide%20Nginx.html#deploying_rails_to_sub_uri
> 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.
>
More information about the nginx
mailing list