title: Nginx Websocket reverse proxy throws error
body: <p>I try to forward a path to a specific url, where my websocket request has to go. It listens on the port 8180. I found the examples from <a href="https://github.com/nicokaiser/nginx-websocket-proxy/blob/master/path-rewriting.conf" rel="nofollow">Nico Kaiser</a>.</p>
  
  <p>My nginx config now looks like the following:</p>
  
  <pre><code>location /sideview/frontend {
      access_log off;
  
      proxy_pass http://domain.de:8180;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  
      # WebSocket support (nginx 1.4)
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
  
      # Path rewriting
      rewrite /sideview/frontend/(.*) /$1 break;
      proxy_redirect off;
  }
  </code></pre>
  
  <p>When I try to connect to the URL, the error: <code>*2508595 no live upstreams while connecting to upstream, client: 87.79.66.136, server: domain.de, request: "GET /sideview/frontend/ws HTTP/1.1", upstream: "http://domain.de/ws", host: "domain.de"</code></p>
  
  <p>The requests also didn't reach the websockets server, as the logs tells me. </p>
  
  <p>What do I have to change, to get it right?</p>