Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Unifi Controller Websocket Connection Error

$
0
0
Hi All,

I have strange problem:

I have two instances of the unifi controller. The main one on my synology in a docker container, and a backup version on a Raspberry Pi also in a docker container. Setup of the containers is exactly the same.

Access to both instances is via reverse proxy - nginx.

setup of nginx is identical:

```
server{

listen 443 ssl http2;

server_name unifi.xxx.com;

location / {

proxy_pass "https://192.168.1.242:8443";

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

}

location /wss {

proxy_pass "https://192.168.1.242:8443";

proxy_http_version 1.1;

proxy_buffering off;

proxy_set_header upgrade $http_upgrade;

proxy_set_header Connection "Upgrade";

proxy_read_timeout 86400;

}

}

server{

listen 443 ssl http2;

server_name unifi2.xxxx.com;

location / {

proxy_pass "https://192.168.1.38:8443";

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

}

location /wss {

proxy_pass "https://192.168.1.38:8443";

proxy_http_version 1.1;

proxy_buffering off;

proxy_set_header upgrade $http_upgrade;

proxy_set_header Connection "Upgrade";

proxy_read_timeout 86400;

}

}

```

The strange thing is that the main unifi at first started up perfectly, and the backup instance unifi2 gave a websocket connection error. Now both give a Websocket Connection Error message. Is there a problem with my settings in the nginx.conf?


Thx,

PPee

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>