Hello, I have a question regarding the usage of a reverse-proxy which is part of a docker network.

I currently use Nginx Proxy Manager as a reverse-proxy for all my services hosted in docker. This works great since I can simply forward using each containers name. I have some services however (e.g. homeassistant) which are hosted separately in a VM or using docker on another device.

Is it possible to use the same reverse-proxy for those services as well? I haven’t found a way to forward to hosts outside of the proxies docker network (except for using the host network setting which I would like to avoid)

  • Scrath@lemmy.dbzer0.comOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 months ago

    Thanks. I tried it like this and still get a 400 Bad Request error.

    Someone below mentioned adding some more IPs to the trusted_proxies list so I tried that as well without result. The IP I used for the reverse-proxy is the IP listed in portainer under the network for the proxy container. Just to reiterate, the container is running on a different device than homeassistant (technically same device but different VM but that shouldn’t make a difference).

    http:
      use_x_forwarded_for: true
      trusted_proxies:
        - 192.168.208.2 # IP of reverse-proxy in its network
        - 192.168.208.0/20 # Subnet of proxy docker network
        - 192.168.1.103 # HA IP
    
    • rambos@lemm.ee
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 months ago

      My NPM window looks the same as yours. Im not sure mate, I would try disabling firewall just to see is that the problem. Im not expert in that area and nothing else comes to my mind sorry. Im also running everything under one host