我很迷茫,不愿独自构建NGINX,但我希望能够启用安全的websocket,而无需增加额外的层.
I'm so lost and new to building NGINX on my own but I want to be able to enable secure websockets without having an additional layer.
我不想在websocket服务器本身上启用SSL,但是我想使用NGINX在整个事情上添加一个SSL层.
I don't want to enable SSL on the websocket server itself but instead I want to use NGINX to add an SSL layer to the whole thing.
那里的每个网页都说我做不到,但是我知道我可以!感谢任何人(我自己)可以向我展示如何!
Every web page out there says I can't do it, but I know I can! Thanks to whoever (myself) can show me how!
推荐答案仅需注意,nginx现在已在1.3.13版本上支持Websockets.使用示例:
Just to note that nginx has now support for Websockets on the release 1.3.13. Example of use:
location /websocket/ { proxy_pass backend_host; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_read_timeout 86400; }您还可以检查 nginx更改日志和 WebSocket代理文档.
更多推荐
NGINX反向代理websocket并启用SSL(wss://)?
发布评论