Energy dashboard behind nginx proxy

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
rolfb
Posts: 14
Joined: Wednesday 26 September 2018 16:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Energy dashboard behind nginx proxy

Post 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 )
LarsK
Posts: 11
Joined: Saturday 28 March 2020 11:41
Target OS: Linux
Domoticz version:
Contact:

Re: Energy dashboard behind nginx proxy

Post by LarsK »

I have exactly the same issue, did you ever find a solution?
User avatar
waltervl
Posts: 5714
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Energy dashboard behind nginx proxy

Post 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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
LarsK
Posts: 11
Joined: Saturday 28 March 2020 11:41
Target OS: Linux
Domoticz version:
Contact:

Re: Energy dashboard behind nginx proxy

Post by LarsK »

Thanks, this solved it!
Post Reply

Who is online

Users browsing this forum: C4rtm4N and 1 guest