Skip to content

Instantly share code, notes, and snippets.

@eduardobc88
Last active April 25, 2019 06:00
Show Gist options
  • Save eduardobc88/6e619958a0c63809a23eef55fdc11863 to your computer and use it in GitHub Desktop.
Save eduardobc88/6e619958a0c63809a23eef55fdc11863 to your computer and use it in GitHub Desktop.
Nginx Reverse Proxy
#### start nginx config
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
# server for handler NodeJS request
server {
listen 80;
server_name *.nodejs.dev;
error_page 404 errors/404.html;
location / {
proxy_pass http://192.168.1.2:3000;
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;
proxy_redirect off;
}
}
}
#### end niginx config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment