Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need nginx to serve a certain location for a certain directory request, for example:


to serve


How can I make that work?

share|improve this question
so when someone goes to http://localhost/this_site you want to serve the contents of /path/to/this_site? – Wayne Werner Dec 27 '12 at 17:44
Exactly right!! – George K. Dec 27 '12 at 17:53
If my answer solved your problem you should mark it accepted by clicking the green checkmark – Wayne Werner Dec 31 '12 at 15:00
up vote 1 down vote accepted

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.

share|improve this answer
Yep! Thanks a lot – George K. Dec 31 '12 at 15:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .