Created
June 4, 2015 10:34
-
-
Save gitawego/a3df866231c1fc3d7237 to your computer and use it in GitHub Desktop.
nginx config for websocket
This file contains hidden or 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
| map $http_upgrade $connection_upgrade { | |
| default upgrade; | |
| '' close; | |
| } | |
| upstream websocket { | |
| server 192.168.100.10:8010; | |
| } | |
| server { | |
| listen 8020; | |
| location / { | |
| proxy_pass http://websocket; | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection $connection_upgrade; | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
need nginx >= 1.3