Skip to content

Instantly share code, notes, and snippets.

@moyus
Created January 13, 2019 11:41
Show Gist options
  • Save moyus/5e946de8103ff1919f1c85aa44290762 to your computer and use it in GitHub Desktop.
Save moyus/5e946de8103ff1919f1c85aa44290762 to your computer and use it in GitHub Desktop.
use nginx proxy to local port application.
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# websocket support
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_http_version 1.1;
# ssl support
# proxy_set_header X-Client-Verify SUCCESS;
# proxy_set_header X-Client-DN $ssl_client_s_dn;
# proxy_set_header X-SSL-Subject $ssl_client_s_dn;
# proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
# proxy_read_timeout 1800;
# proxy_connect_timeout 1800;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment