Page 1 of 1

Energy dashboard behind nginx proxy

Posted: Friday 06 September 2024 15:26
by rolfb
Version: 2024.7
Platform: raspberry pi 3, Ubuntu 22.04.4 LTS
Plugin/Hardware: Rpi3

Hi,
really delighted with the new energy dashboard! Looks slick and give good insight.
When playing with it, I was reminded I have a seperate port open in my router, leading to the raspberry pi with domo.
But since I also run a nginx reverse proxy I decided to proxy domo as well, following https://www.domoticz.com/wiki/WebServer_Proxy
(code below)

This works well, but to my surprise the energy dashboard (and only that page!) does display, but without values (apart from zero's).
Checking energy dashboard either via domo's internal IP, or the seperate port and external URL, gives the correct values...
This is via different browsers, incognito windows etc.

Does anyone recognises this, and have a solution?

Domo 2024.7 runnig on a raspberry pi 3, Ubuntu 22.04.4 LTS

Code: Select all

        location /domoticz {
               rewrite ^/domoticz/?(.*) /$1 break;
               proxy_http_version      1.1;
               proxy_read_timeout      90;
               proxy_set_header        Host $host;
               proxy_set_header        X-Real-IP $remote_addr;
               proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
               proxy_set_header        X-Forwarded-Proto $scheme;
               proxy_set_header        X-Scheme $scheme;
       #        proxy_set_header        Upgrade $http_upgrade;
       #        proxy_set_header        Connection $connection_upgrade;
               add_header              X-Frame-Options SAMEORIGIN;
               proxy_pass https://192.168.1.22;
       }

(I commented the 2 lines because I have domo running with https )

Re: Energy dashboard behind nginx proxy

Posted: Tuesday 08 April 2025 16:21
by LarsK
I have exactly the same issue, did you ever find a solution?

Re: Energy dashboard behind nginx proxy

Posted: Tuesday 08 April 2025 16:44
by waltervl
viewtopic.php?p=324825#p324825
Development console said "angular-websocket.js:127 WebSocket connection to 'ws://xx.xx.xx/json' failed: " and when I enable Websocket Support in NGINX Proxy Manager it starts working.

Re: Energy dashboard behind nginx proxy

Posted: Tuesday 08 April 2025 18:00
by LarsK
Thanks, this solved it!