Skip to content

Instantly share code, notes, and snippets.

@hcm82
Forked from mikelikespie/nginx.conf
Created March 2, 2022 11:45
Show Gist options
  • Save hcm82/bff28d681445413e39f6ad58b5588a24 to your computer and use it in GitHub Desktop.
Save hcm82/bff28d681445413e39f6ad58b5588a24 to your computer and use it in GitHub Desktop.
using nginx as a websocket reverse proxy
location / {
chunked_transfer_encoding off;
proxy_http_version 1.1;
proxy_pass http://localhost:9001;
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host:9001;
proxy_set_header Connection "Upgrade";
proxy_set_header Upgrade websocket;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment