Skip to content

Instantly share code, notes, and snippets.

@z2015
Last active July 29, 2016 04:33
Show Gist options
  • Save z2015/1b35b977a72aeded0eb7b12cc2d05f2f to your computer and use it in GitHub Desktop.
Save z2015/1b35b977a72aeded0eb7b12cc2d05f2f to your computer and use it in GitHub Desktop.
Nginx bind nodejs
server {
listen 80;
server_name wx.example.com;
location / {
proxy_pass http://localhost:1336;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
sudo ln -s /etc/nginx/sites-available/wx /etc/nginx/sites-enabled/wx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment