Apache和Nginx代理连接后面的Websockets未升级

我有个问题。 Apache监听一个白色的ip,并将代理请求/城市仪表板上的所有请求/ ssd代理到另一个带有websocket的服务器。 在Apacheconfiguration中:

ProxyPass /ssd/ http://10.127.32.24 ProxyPassReverse /ssd/ http://10.127.32.24 

nginxconfiguration:在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; } 

请求标题:

 GET ws://xxxx/ssd/city-dashboard/stream HTTP/1.1 Host: xxxx Connection: Upgrade Pragma: no-cache Cache-Control: no-cache Upgrade: websocket Origin: http://xxxx Sec-WebSocket-Version: 13 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.125 Safari/537.36 Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8 Sec-WebSocket-Key: 881o9c/z3Q437JFCti3BIw== Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits 

响应标题:

 Connection:Upgrade, close Content-Length:34 Content-Type:text/html; charset=UTF-8 Date:Wed, 19 Aug 2015 16:53:40 GMT Server:nginx/1.8.0 Upgrade:websocket Connection: close 

状态代码400错误的请求我做错了什么? 我认为也许apache或nginx剪头,如何使他们没有?

我试图在apache conf写:

 Header set Connection "Upgrade" RequestHeader setifempty Connection "Upgrade" Header set Upgrade "websocket" RequestHeader setifempty Upgrade "websocket"