#PROXY-START/
underscores_in_headers on;
location / {
proxy_pass http://127.0.0.1:20001;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
grpc_read_timeout 300s;
grpc_send_timeout 300s;
grpc_pass grpc://localhost:20002;
}
location ~ ^/(ws|terminal/.+)$ {
proxy_pass http://127.0.0.1:20001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
}
#PROXY-END/
这是目前用的,打开直接502错误了,不清楚问题出在哪里。。。http2support和ws support都开启了