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 Nico Kaiser.
My nginx config now looks like the following:
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;
}
When I try to connect to the URL, the error: *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"
The requests also didn't reach the websockets server, as the logs tells me.
What do I have to change, to get it right?