项目
在 GitHub 查看
nicokaiser/nginx-websocket-proxy
关于
nginx WebSocket 代理。
系统与基础设施实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文nginx WebSocket Proxy
As of version 1.4, nginx is capable of forwarding WebSocket requests, so it can be used as a reverse proxy for HTTP, HTTPS, WS and WSS.
Here are some simple example configuration snippets for WebSocket forwarding in nginx.
Requirements
- nginx 1.4.x or higher
- WebSocket and HTTP server running on
ws|http://localhost:8080
This is a typical scenario given by Engine.IO, Socket.IO, Primus, etc. which provide a WebSocket server with HTTP fallback.
Example Configs
- Simple WebSocket Proxy – forwards WS and HTTP requests to
ws|http://localhost:8080 - WebSocketSecure Proxy – forwards WSS and HTTPS requests to
ws|http://localhost:8080 - WebSocket Proxy with Path Rewriting – forwards
wss|https://ws.example.com/services/myservicetows|http://localhost:8080 - WebSocket Proxy with Load Balancing – like previous example, but with three backend servers, with one client always being forwarded to the same backend
See Also
- http://nginx.org/en/docs/http/websocket.html
- Nginx Server Configs – Great resource for nginx server config documentation
Author
Nico Kaiser
License
探索相关项目
加载中…