Skip to content

Instantly share code, notes, and snippets.

@nairihar
Created April 21, 2018 08:16
Show Gist options
  • Save nairihar/39018eef2bd9814f31879b3725c973ed to your computer and use it in GitHub Desktop.
Save nairihar/39018eef2bd9814f31879b3725c973ed to your computer and use it in GitHub Desktop.
NodeJS with NGINX, medium, nginx conf
upstream api {
server 127.0.0.1:3000;
server 127.0.0.1:3001;
}
server {
listen 8080;
location / {
proxy_pass http://api;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment