nginx为workerman、socketio提供ssl

原创
06/19 10:50
阅读数 255
  1. nginx
location /wss
{
	proxy_pass http://127.0.0.1:3322;
	proxy_http_version 1.1;
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection "Upgrade";
	proxy_set_header X-Real-IP $remote_addr;
}

location /socket.io
{
	proxy_pass http://127.0.0.1:3310;
	proxy_http_version 1.1;
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection "Upgrade";
	proxy_set_header X-Real-IP $remote_addr;
}
  1. apache
# Proxy Config
ProxyRequests Off
ProxyPass /wss ws://127.0.0.1:3322
ProxyPassReverse /wss ws://127.0.0.1:3322

ProxyPass /socket.io http://127.0.0.1:3310
ProxyPassReverse /socket.io http://127.0.0.1:3310
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部