凌的博客

您现在的位置是: 首页 > 学无止境 > PHP > 

PHP

宝塔配置websocket代理 域名/wss

2022-10-02 PHP 2010
server
{
    listen 80;
	listen 443 ssl http2;
	......
	......
    #SSL-END
    ##访问域名http://127.0.0.1:50001 => wss://域名/wss 
    location /wss {
          proxy_pass http://127.0.0.1:50001; ##代理到上面的ip
          proxy_connect_timeout 30s;
          proxy_read_timeout 86400s;
          proxy_send_timeout  30s;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection "Upgrade";
	}
	......
	......


文章评论

0条评论