1. https://foo.com/ -> WAN -> *:443 -> decrypt -> foo.intranet:80/2. https://foo.com/bar -> WAN -> *:443 -> decrypt -> bar.intranet:3000/3. https://foo22.com/bar -> WAN -> *:443 -> decrypt -> bar22.intranet:8080/
frontend default_ssl bind 0.0.0.0:443 name 0.0.0.0:443 ssl crt-list /var/etc/haproxy/ssl/5aeeda9fd8e5e2.51517701.crtlist mode http option http-keep-alive #default_backend nextcloud_bep default_backend Grafana # tuning options timeout client 30s acl acl_nc hdr(host) -i nexctloud.my.com use_backend nextcloud_bep if acl_nc acl acl_5aeedb998d8044.83346815 path_beg -i /.well-known/acme-challenge/ use_backend acme_challenge_backend if acl_5aeedb998d8044.83346815 acl acl_home hdr(host) -i home.my.com acl acl_cauges path_beg -i /gauges use_backend Grafana if acl_home acl_gaugesbackend Grafana # health checking is DISABLED mode http balance source # stickiness stick-table type ip size 50k expire 30m stick on src # tuning options timeout connect 30s timeout server 30s acl acl_5ae5eeecbbf009.46818008 hdr(host) -i home.my.com reqirep ^([^\ :]*)\ /gauges/(.*) \1\ /\2 http-request add-header X-Forwarded-For %[src] reqirep ^Host:\ home.my.com Host:\ grafana.intranet:3000 acl hdr_location res.hdr(Location) -m found rspirep ^Location:\ (https?://home.my.com(:[0-9]+)?)?/gauges(/.*) Location:\ /\3 if hdr_location rspirep ^ http-request add-header X-Forwarded-For %[src] if acl_5ae5eeecbbf009.46818008 server grafana grafana.intranet:3000backend nextcloud_bep # health check: http_check option httpchk OPTIONS / HTTP/1.0 mode http balance source # stickiness stick-table type ip size 50k expire 30m stick on src # tuning options timeout connect 30s timeout server 30s server nextcloud nc.intranet:8090 check inter 2s
# ACTION: foobar_away http-request set-uri %[path,regsub(/bar/,/)] if acl_5aef6814c09b63.87584580