I second that. Different map file types should be mentioned in the tutorial.
I even use type "reg", because sometimes, I use HAproxy as a first-level reverse proxy for CG-NAT backends that are only reachable via IPv4.
I want to use that for *.domain.xyz (DOMAIN_dyndns), while keeping another local backend (DOMAIN_backend) for www.domain.xyz and domain.xyz.
This does not even work with map type "beg" and ".domain.xyz", because the first dot will be ignored. You have to use a regex map with a setup like:
(?i)^www\.domain\.xyz$ DOMAIN_backend
(?i)^.+\.domain\.xyz$ DOMAIN_dyndns
(?i)^domain\.xyz$ DOMAIN_backend
Note the order, which is relevant for "reg" maps.
I even use type "reg", because sometimes, I use HAproxy as a first-level reverse proxy for CG-NAT backends that are only reachable via IPv4.
I want to use that for *.domain.xyz (DOMAIN_dyndns), while keeping another local backend (DOMAIN_backend) for www.domain.xyz and domain.xyz.
This does not even work with map type "beg" and ".domain.xyz", because the first dot will be ignored. You have to use a regex map with a setup like:
(?i)^www\.domain\.xyz$ DOMAIN_backend
(?i)^.+\.domain\.xyz$ DOMAIN_dyndns
(?i)^domain\.xyz$ DOMAIN_backend
Note the order, which is relevant for "reg" maps.
"