0
I need nginx to serve a certain location for a certain directory request, for example:
localhost/this_site
to serve
/path/to/this_site
How can I make that work?
0
I need nginx to serve a certain location for a certain directory request, for example:
localhost/this_site
to serve
/path/to/this_site
How can I make that work?
1
You want the location (This post about nginx, django, and gunicorn has a good introduction).
server {
... your server code here ...
location /this_site/ {
root /path/to/this_site;
}
}
Should do what you're looking for.
so when someone goes to
http://localhost/this_site
you want to serve the contents of/path/to/this_site
? – Wayne Werner – 2012-12-27T17:44:08.680Exactly right!! – George K. – 2012-12-27T17:53:50.570
If my answer solved your problem you should mark it accepted by clicking the green checkmark – Wayne Werner – 2012-12-31T15:00:30.580