On Sat, Sep 6, 2014 at 6:07 PM, Diana Hsu (ditsai) <[email protected]> wrote: > Hi Willy, > > We are migrating applications from siteA to siteB, the technology used to > run the applications is different in these 2 sites. > > All the applications in siteA share the same domain sitea.sample.com, but > each application has its unique uri (ex: /proxy1, /proxy2, /proxy3 ..). > We want to migrate applications in siteA to start using new technology that > is offered in siteB, however migrated applications need to keep existing > domain name sitea.sample.com. > > siteB is managed by the different group and we have no privilege to change > siteB's configuration. > Each application provisioned in siteB is configured to have its own vanity > name (ex: abc.sample.com, xyz.sample.com, ..) which is the CNAME(alias) of > siteb.sample.com. > siteB's HAProxy uses Host header matching to route the requests to the > proper backend application servers, for example: > > acl ABC hdr_dom(host) -i abc.sample.com > use_backend SFARM-ABC if ABC > > How can we configure in siteA's HAProxy to meet above requirement? Should > we configure HAProxy as reverse-proxy in siteA? > > > Thanks, > Diana >
Hi, Please avoid HTML mails :) It's up to you to match uri /proxy1 of site A to CNAME of site B. Then in your configuration, you could do: acl sitea_ABC path_beg -i /abc acl siteb_ABC hdr_dom(host) -i abc.sample.com use_backend SFARM-ABC if sitea_ABC || siteb_ABC Well, this is my understanding of your problem! Baptiste

