这是我设置内容:
upstream for_ssl { server 127.0.0.1:1234; } proxy_pass http :// for_ssl;
下面是出的错:
400 Bad Request Sec-WebSocket-Key not found. This is a WebSocket service and can not be accessed via HTTP.
求高人指点。。
nginx对长连接做代理的时候有个协议升级的概念加上这段代码就没问题了,允许协议升级
proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
nginx对长连接做代理的时候有个协议升级的概念
加上这段代码就没问题了,允许协议升级