Hi, On Tue, 2021-10-05 at 15:56 +0200, Ionel GARDAIS wrote: > Hi, > > I'm having trouble with backend-routing based on host header when H2 is > enabled. > Frontend is https only and all backends are HTTP1. > We're using v2.4.4. > > When the user browser is directed to app2.example.com, it switches to > app1.example.com. > There is one public IP address, certificate is wildcard for the domain, so > app1 and app2 share the same IP and certificate. > When H2 is disabled, all is working fine. > > Currently, backend selection is made with > use_backend %[req.hdr(host),lower] >
Have you looked at this thread: https://www.mail-archive.com/[email protected]/msg40652.html your issue sounds similar. Is one backend the default_backend (where HTTP/2 requests go) ? Does it work with something like: use_backend %[req.hdr(host),lower,regsub(:\d+$,,)] or use_backend %[req.hdr(host),lower,word(1,:)] (https://www.haproxy.com/blog/how-to-map-domain-names-to-backend-server-pools-with-haproxy/) or using maps: https://www.haproxy.com/blog/how-to-map-domain-names-to-backend-server-pools-with-haproxy/ (use_backend %[req.hdr(host),lower,map_dom(/etc/haproxy/maps/hosts.map,be_default)]) -Jarno > Would > use_backend %[ssl_fc_sni,lower] # Layer 5 > or > use_backend %[req.ssl_sni,lower] # Layer 6 > help with H2 ? > > Thanks, > Ionel > > -- Jarno Huuskonen

