Skip to content

Instantly share code, notes, and snippets.

Created June 21, 2013 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/5831109 to your computer and use it in GitHub Desktop.
Save anonymous/5831109 to your computer and use it in GitHub Desktop.
dtutor
root@localhost:/etc/nginx/conf.d# cat dtutor.conf
upstream dtutorapp {
server 127.0.0.0:9001;
}
server {
listen 80;
server_name www.dtutor.org;
root /home/dtutor/dtutor/app/static/;
keepalive_timeout 5;
location / {
try_files $uri @proxy_to_app;
}
location @proxy_to_app {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_pass http://s127.0.0.0:9001;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment