I wasted a day yesterday with this config. This all seemed to work randomly,
sometimes routing to default backend, sometimes routing to the acl backend.
The problem was I had ‘mode tcp’ in global and had to add ‘mode http’ to the
frontend, otherwise, the acl can’t see the headers.
Whilst I understand now why this was the case I was baffled for many hours
because it just worked but apparently randomly.
Do you think a warning - “Use of acl rules in tcp mode won’t match header
rules” ? Or something would be useful?
Thanks,
Jack.
# Frontend listen ports
frontend f_http_80
bind *:80
acl community hdr(host) -i community.xx.com
use_backend b_http_community if community
default_backend b_http_varnish