一直报错 connection to 'wss://myhost:3001/websockets' failed:
docker exec -it wechat-selkies /bin/bash 进入容器
cd /etc/nginx/sites-enabled
查看nginx 配置 发现
cat default
location /websocket {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_connect_timeout 3600s;
proxy_buffering off;
client_max_body_size 10M;
proxy_pass http://127.0.0.1:8082;
}
前端请求的是websockets nginx 是websocket 差了一个s
一直报错 connection to 'wss://myhost:3001/websockets' failed:
docker exec -it wechat-selkies /bin/bash 进入容器
cd /etc/nginx/sites-enabled
查看nginx 配置 发现
cat default
前端请求的是websockets nginx 是websocket 差了一个s