Created
December 12, 2019 10:15
-
-
Save abersheeran/7b625b1c86d3bf56909639d3dc1796f3 to your computer and use it in GitHub Desktop.
Nginx 反向代理 websocket
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
server { | |
listen 443 ssl; | |
server_name websocks; | |
root html; | |
ssl_certificate /path/to/websocks.pem; | |
ssl_certificate_key /path/to/websocks.key; | |
ssl_session_timeout 5m; | |
location / { | |
proxy_pass http://127.0.0.1:8765; | |
proxy_set_header Host $http_host; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment