Skip to content

Instantly share code, notes, and snippets.

@joonas
Created January 9, 2011 02:11
Show Gist options
  • Save joonas/771344 to your computer and use it in GitHub Desktop.
Save joonas/771344 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name example.com;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
# Don't proxy static files like robots.txt and favicon.ico.
location ~ ^/(favicon.ico|robots.txt|sitemap.xml)$ {
alias /home/deploy/sites/.../public/$1;
}
location /media {
alias /home/deploy/sites/.../current/media;
}
location /static {
alias /home/deploy/sites/.../current/static;
}
location / {
proxy_pass http://127.0.0.1:8002;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment