用nginx转发1Panel管理地址,结果在使用到终端的时候,连接不上,看日志提示出错
websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' head
这是用nginx转发WebSocket
请求时,配置问题,就会出现此问题。
解决办法在转发location中添加
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade