diff --git a/haproxy/haproxy.cfg b/haproxy/haproxy.cfg index 481c651..312bf48 100644 --- a/haproxy/haproxy.cfg +++ b/haproxy/haproxy.cfg @@ -15,6 +15,22 @@ frontend http-in use_backend pwd1 if host_pwd1 use_backend pwd2 if host_pwd2 + acl host_lab_bingohuang hdr(host) lab.bingohuang.com + acl host_pwd1_b hdr_reg(host) -i ^.*\.?host1\.lab.bingohuang.com?:?.*$ + acl host_pwd2_b hdr_reg(host) -i ^.*\.?host2\.lab.bingohuang.com?:?.*$ + + use_backend all if host_lab_bingohuang + use_backend pwd1 if host_pwd1_b + use_backend pwd2 if host_pwd2_b + + acl host_labs_bingohuang hdr(host) labs.bingohuang.com + acl host_pwd1_c hdr_reg(host) -i ^.*\.?host1\.labs.bingohuang.com?:?.*$ + acl host_pwd2_c hdr_reg(host) -i ^.*\.?host2\.labs.bingohuang.com?:?.*$ + + use_backend all if host_labs_bingohuang + use_backend pwd1 if host_pwd1_c + use_backend pwd2 if host_pwd2_c + backend all balance roundrobin