Closed syscc closed 4 weeks ago
使用HTTPS的话,21118,21119需要走wss
server {
server_name <your server>;
listen 21118 ssl;
ssl_certificate <your cert>;
ssl_certificate_key <your key>;
location / {
proxy_pass http://localhost:21108;
proxy_http_version 1.1;
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;
}
}
server {
server_name <your server>;
listen 21119 ssl;
ssl_certificate <your cert>;
ssl_certificate_key <your key>;
location / {
proxy_pass http://localhost:21109;
proxy_http_version 1.1;
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;
}
}
然后你server的21118
和21119
分别改成 21108
21109
即可
明白了感谢
Web Client不支持反代后 https连接