HAProxy community

Appending path and redirecting URL

i’m using haproxy 1.8…working well with termination and pass-through…i’m trying to no avail to add location servers with path name appended e.g. below is a front-end and back-end that is working … however … i’m using redir which is fine inside the firewall but i want to go through haproxy and be able to access this server outside the firewall (aka unifi-backend) … foobar-unifi.ddns.net is accesable via nslookup using no-ip.com

question: how to i change
server unifi redir check
to allow for access to server through haproxy by accessing https://foobar-unifi.ddns.net? thanks in advance

frontend https-front
        bind unix@/var/run/haproxy.sock ssl crt /etc/letsencrypt/live/foobar.ddns.net/haproxy.pem accept-proxy
        mode http

        use_backend home-assistant-backend if { ssl_fc_sni -i foobar-ha.ddns.net }
        use_backend nextcloud-backend if { ssl_fc_sni -i farbar-nc.ddns.net }
        use_backend blueiris-backend if { ssl_fc_sni -i foobar-bi.ddns.net }
        use_backend pihole-backend if { ssl_fc_sni -i foobar-dns.ddns.net }
        use_backend unifi-backend if { ssl_fc_sni -i foobar-unifi.ddns.net }
        use_backend unms-backend if { ssl_fc_sni -i foobar-unms.ddns.net }
        use_backend haproxy-backend if { ssl_fc_sni -i foobar-haproxy.ddns.net }
        default_backend blueiris-backend

backend unifi-backend
        mode http
        server unifi redir check
        http-request set-header X-Forwarded-Port %[dst_port]
        http-request add-header X-Forwarded-Proto https if { ssl_fc }

Closing for: