Open mnash04 opened 7 years ago
I think you need to tell nginx that WebSocket connections to wss://frontend/ must be redirected to ws://backend/. The app is trying to connect using WSS protocol because you are using HTTPS in the front-end, but backend is only listen to HTPP/WS protocols. Try with something similar to this configuration: http://www.tutorialspoint.com/articles/how-to-configure-nginx-as-reverse-proxy-for-websocket
I agree.
That configuration didn't work either. I've set up two other similar websocket reverse proxies with nginx and ssl before. This one doesn't want to work though. The main difference is that in this one, there is no separate path like /rooms/ specified, its just " / ". Is there a way people have proxied it with the websocket running on a separate port than 80?
Has anyone successfully been able to put a proxy in front of this server?
I'm able to successfully proxy using nginx on port 80 to the back end loowid server on port 80 (no certs)
When I try to proxy using nginx on port 443 (with certs) to the back end loowid server on port 80 (no certs) I get this error:
WebSocket connection to 'wss://backendserver:80/' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR
Here is the relevant nginx configuration:
location / { proxy_pass http://backendserver:80; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; }
Thanks.