Skip to content

Instantly share code, notes, and snippets.

@mde
Created May 9, 2014 03:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mde/c07995770e5b8e960802 to your computer and use it in GitHub Desktop.
Save mde/c07995770e5b8e960802 to your computer and use it in GitHub Desktop.
Sample Nginx config
upstream foo_site {
server 127.0.0.1:4000;
}
server {
listen 80;
server_name www.foo.com foo.com;
access_log /var/log/nginx/foo_site.access.log;
location / {
proxy_pass http://foo_site;
}
# Static files location
location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
root /home/mde/work/foo/public;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment