I have an active/passive LB setup and I have multiple domains and applications 
behind the setup.  I am hoping you can help me see if something is possible.

I have a rule that states that www.somedomain.com gets forwarded to farm X.  I 
have another rule that states that staging.somedomain.com gets routed to farm 
Y.  I have been asked if I can allow http://somedomain.com to work.  I 
understand that I have to mess with DNS as well, but from an HAProxy 
perspective can I add an ACL that allows this to route to farm X?  The existing 
rules would also need to continue to work.  So staging.somedomain.com would 
still need to route to farm Y, etc.  Below are my rules per my config.


frontend http-in
       mode http
########################################################################################
# ACLs 
#################################################################################
###### These are test ones that would direct clients 
###################################
###### to different backends depending on the 
##########################################
###### host or domain field in the host header 
#########################################
########################################################################################
       acl is_lsr hdr_beg(host) -i www.domaina.com
       acl is_domainb hdr_beg(host) -i domainb.com
       acl is_domainb hdr_beg(host) -i www.domainb.com
       acl is_domainb dst 10.101.69.96
       acl is_domainb hdr_beg(host) 63.239.123.254
       acl is_domainc hdr_dom(host) -i domainc.com
       acl is_domaind hdr_dom(host) -i domaind.com
       acl is_domainc hdr_beg(host) -i 63.239.123.254
       acl is_domaind hdr_dom(host) -i domaind.org
       acl is_domainc hdr_dom(host) -i domainc.org
       acl is_domaind hdr_dom(host) -i domaind.net
       acl is_domainc hdr_dom(host) -i domainc.net
       acl is_punchout hdr_beg(host) -i punchout.domainb.com
       acl is_lbtest hdr_beg(host) -i lbtest.domainb.com
       acl is_stg hdr_beg(host) -i staging.domaina.com
       acl is_stg hdr_beg(host) -i staging.domainb.com
       acl is_stg dst 10.101.69.75
       acl is_load hdr_beg(host) -i load.domaina.com
       acl is_load hdr_beg(host) -i load.domainb.com
       acl is_domaine hdr_dom(host) -i domaine.org
       acl is_domainf hdr_dom(host) -i domainf.org
       acl is_domaine hdr_dom(host) -i domaine.com
       acl is_domainf hdr_dom(host) -i domainf.com
       acl is_domaine hdr_dom(host) -i domaine.net
       acl is_domainf hdr_dom(host) -i domainf.net
       redirect location http://www.domaine.org if is_domaine
       redirect location http://www.domaine.org if is_domainf
       redirect location http://www.domainc.com if is_domainc or is_domaind
       use_backend XYZ-HTTP if is_lsr or is_lbtest
       use_backend DOMA-HTTP if is_dharmacon or is_punchout
       use_backend DOMB-HTTP if is_open
       use_backend STG-HTTP if is_stg or is_load
       use_backend DOMF-HTTP if is_domaine or is_domainf
#########################################################################
# ACLs ending ###########################################################
#########################################################################

Thanks,

Bryan



Reply via email to