Created
April 11, 2017 00:22
-
-
Save kkeybbs/e5f19e96856db34b48c3776296537428 to your computer and use it in GitHub Desktop.
nginx websocket proxy
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
location /publish/dev/app/ws { | |
proxy_pass http://test:80; | |
# include conf.d/ws.txt; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
proxy_pass_request_headers on; | |
proxy_pass_header Server; | |
real_ip_header X-Real-IP; | |
# proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $http_host; | |
proxy_set_header X-Scheme $scheme; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment