title: Websockets behind Apache and Nginx proxy connection not upgraded
body: <p>I have a problem. Apache listens on a white ip and proxies all requests /ssd on nginx that proxies requests /city-dashboard to another server with websockets. In apache config:</p>
  
  <pre><code>ProxyPass /ssd/ http://10.127.32.24
  ProxyPassReverse /ssd/ http://10.127.32.24
  </code></pre>
  
  <p>nginx config:
  on nginx.conf:</p>
  
  <pre><code> map $http_upgrade $connection_upgrade {
      default upgrade;
      ''      close;
  }
  include /etc/nginx/conf.d/*.conf;
  </code></pre>
  
  <p>on default.conf</p>
  
  <pre><code> 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;
   }
  </code></pre>
  
  <p>Request headers:</p>
  
  <pre><code>Connection: Upgrade
  Upgrade: Websocket
  </code></pre>
  
  <p>Response headers:</p>
  
  <pre><code>Connection: close
  Status Code 400 Bad Request
  </code></pre>
  
  <p>what am I doing wrong?</p>