Skip to content
本页内容

nginx 代理

nginx 代理 co-service 6.5 需要注意:

  • co-service 6.5 采用 http1.1 协议
  • co-service 6.5 用到 websocket

nginx 需要增加配置项:

  • proxy_http_version 1.1
  • proxy_set_header Upgrade $http_upgrade
  • proxy_set_header Connection "upgrade"

~/conf/nginx.conf

nginx
 location / {
			proxy_pass http://192.168.1.99:6108;

			proxy_http_version 1.1;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection "upgrade";
        }

 location / {
			proxy_pass http://192.168.1.99:6108;

			proxy_http_version 1.1;
			proxy_set_header Upgrade $http_upgrade;
			proxy_set_header Connection "upgrade";
        }

Powerd by Vitepress.