0

I am trying to match the host request header and use appropriate backend to route the request.

This is what I want to match on (which does not work):

acl from_external_url req.hdr(Host) -i mydomain.com  

# Chrome dev tools network tab does show mydomain.com set as the Host header

However, matching to a direct IP address works (which I don't want):

acl from_external_url req.hdr(Host) -i 22.22.22.22

So, how do I make HAProxy route on hostname instead of the IP?

summerNight
  • 113
  • 1
  • 6
  • Examples at https://www.haproxy.com/blog/web-application-name-to-backend-mapping-in-haproxy/ seem to use this form: `acl from_external_url hdr(Host) -i example.com`. Try that. – Doug Deden Feb 08 '19 at 01:33
  • @DougDeden I already did that as well, the acl fails to match on that. – summerNight Feb 08 '19 at 18:30

0 Answers0