Created
April 19, 2014 14:08
-
-
Save taka-wang/11085396 to your computer and use it in GitHub Desktop.
nginx to reverse proxy websockets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream my_websocket { | |
server localhost:443; | |
} | |
server { | |
listen 444; | |
server_name _; | |
location / { | |
proxy_pass http://my_websocket ; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_set_header Host $host; | |
proxy_read_timeout 86400; // default 60 secs | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment