Skip to content

Instantly share code, notes, and snippets.

@stephanie-gredell
Last active August 29, 2015 14:17
Show Gist options
  • Save stephanie-gredell/ff52015c212079f4f10e to your computer and use it in GitHub Desktop.
Save stephanie-gredell/ff52015c212079f4f10e to your computer and use it in GitHub Desktop.
Node and Nginx
server {
listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /var/www; index index.html index.htm; # Make site accessible from http://localhost/ servername domain.com www.domain.com;
location /api/ {
proxypass http://localhost:3000;
proxysetheader Host $host;
proxy_buffering off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment