help: proxy to https is working websockets is not!

mevan nginx-forum at forum.nginx.org
Wed Feb 16 01:56:18 UTC 2022


I have the following configuration working. I am able to login to the
application and most of it works. However there are 
certain elements which function as websockets. I see this message in the
browser devtools: 

WebSocket connection to 'wss://erx.asdf.com/ws/stats' failed:
edge.min.js:3210 

How can I get this last part working? 

Here is my configuration so far:

server {
    listen 80;
    server_name  erx.asdf.com;
    location / { return 301 https://$host$request_uri; }
}

upstream backend {
        server 192.168.1.1:443;
}

server {
    listen 443;
    server_name  erx.asdf.com;
    location / {
        proxy_pass https://backend;
        proxy_ssl_server_name on;
        proxy_ssl_name DOMAIN;
        proxy_set_header Host $host;
    }
}

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,293691,293691#msg-293691



More information about the nginx mailing list