Nginx Headache

Hello, i’m trying to include an iframe_panel for node red into homeassistant i’m using the following config in configuration.yaml

panel_iframe:
  nodered:
    title: 'Node red'
    url: https://nodered.url:1880
    icon: mdi:nodejs 

Further i’m running homeassistant behind nginx with the following config

location / {
    proxy_pass http://192.168.1.103:8123;
    proxy_set_header Host $host;
    proxy_redirect http:// https://;
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;
}

location /nodered {
        proxy_pass http://192.168.1.103:8123/nodered;
        proxy_set_header Host $host;
        proxy_redirect http:// https://;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }
}

This is working perfect on my internal network. However, if i’m accessing my external url and go to the iframe it says ttps://nodered.url:1880 can’t be reached and may be down. Is there a way to solve this?

Sound like nodereed is on different port from ha?

In this case you must proxy pass to that IP:port.
Local works because you can access the ip:port local but temoye not work because external can reach IP:port.

Also, not sure if same host can proxy to different port so not sure how to get nginx to work for iframe exactly