Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ioBroker behind nginx Proxy - Nodered does not work #478

Open
fritzrichter opened this issue Jun 21, 2024 · 3 comments
Open

ioBroker behind nginx Proxy - Nodered does not work #478

fritzrichter opened this issue Jun 21, 2024 · 3 comments

Comments

@fritzrichter
Copy link

Hi there,
my iobroker is installed as docker image and macvlan as network. On top I hide it behind an nginx (swag) proxy. It's working so far overall.

Nodered is bound to eth1 and port 1881 which I put behind an nginx proxy as well, I am able to open it via https://nodered.xyz.com.

My problems are the following:

  1. The "Node-RED" page in the menu does not open anything
  2. If I click the overview page I see there is a link to nodered, but this URL has two problems. It looks like this "httpundefined://172.20.0.10:1881/". The first problem is httpundefined, the second is the internal IP which is docker internal, instead I'd like to use my external proxy url.

Any idea how to solve this?

@klein0r
Copy link
Contributor

klein0r commented Jun 21, 2024

Which admin version is used?

Maybe related to ioBroker/ioBroker.admin#2247 (comment)

@fritzrichter
Copy link
Author

v6.13.16

@mickym2
Copy link
Contributor

mickym2 commented Aug 3, 2024

Hi there, my iobroker is installed as docker image and macvlan as network. On top I hide it behind an nginx (swag) proxy. It's working so far overall.

Nodered is bound to eth1 and port 1881 which I put behind an nginx proxy as well, I am able to open it via https://nodered.xyz.com.

My problems are the following:

  1. The "Node-RED" page in the menu does not open anything
  2. If I click the overview page I see there is a link to nodered, but this URL has two problems. It looks like this "httpundefined://172.20.0.10:1881/". The first problem is httpundefined, the second is the internal IP which is docker internal, instead I'd like to use my external proxy url.

Any idea how to solve this?

I raised a feature request (ioBroker/ioBroker.admin#2589) to modify the URLs - as IP addresses are in general no way to work properly.

For working with node-red you can ignore iobroker - and create the node-red URLs direct.

I rewrote the URLS first

location / {

....
                        if ($http_referer ~ "https://mwhomexxxxxxxxxxxxxxx/node-red"){
                                rewrite ^/(.*) /node-red/$1;
                        }


                        rewrite ^(/images/.*)$ /node-red$1;




                }

and then I used two rules for redirecting - one for the editor and one for the dashboard.

location /node-red/ {
                        proxy_pass http://mwhome.fritz.box:1880/;
                }


location /dashboard/ {
                        proxy_pass http://mwhome.fritz.box:1880/ui/;
                }

With iobroker ifself I have a lot problems so I gave it up, to define for each adapter own rules and the URLs of the tiles in the overview tab cannot be fixed in my opinion (this is why I raised the feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants