Skip to content

Instantly share code, notes, and snippets.

@TheRightChoyce
Created December 4, 2012 21:06
Show Gist options
  • Select an option

  • Save TheRightChoyce/4208678 to your computer and use it in GitHub Desktop.

Select an option

Save TheRightChoyce/4208678 to your computer and use it in GitHub Desktop.
Basic nginx configuration to run a node server internally on port 3000
#
# Basic nginx config for a node.js server
server {
root /var/www;
index example.js;
server_name localhost;
location / {
proxy_pass http://127.0.0.1:3000;
expires 30d;
access_log off;
}
location /content { # if you want to serve static content
root /var/www/content;
autoindex off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment