help: proxy to https is working websockets is not!

mevan nginx-forum at
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://' failed:

How can I get this last part working? 

Here is my configuration so far:

server {
    listen 80;
    location / { return 301 https://$host$request_uri; }

upstream backend {

server {
    listen 443;
    location / {
        proxy_pass https://backend;
        proxy_ssl_server_name on;
        proxy_ssl_name DOMAIN;
        proxy_set_header Host $host;

Posted at Nginx Forum:,293691,293691#msg-293691

More information about the nginx mailing list