我有问题。 Apache侦听一个白色的ip并代理nginx上的所有请求/ ssd代理请求/ city-dashboard到另一个带websockets的服务器。在apache配置中:
ProxyPass /ssd/ http://10.127.32.24
ProxyPassReverse /ssd/ http://10.127.32.24
nginx配置: 在nginx.conf上:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
include /etc/nginx/conf.d/*.conf;
在default.conf上
location /city-dashboard/stream {
proxy_pass http://10.127.32.24:5000/stream;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
请求标题:
Connection: Upgrade
Upgrade: Websocket
回复标题:
Connection: close
Status Code 400 Bad Request
我做错了什么?
答案 0 :(得分:0)
请求中的授权标头怎么样?这似乎是授权问题。