On Wed, Nov 19, 2014 at 8:05 PM, Qingshan Xie <[email protected]> wrote: > CORRECTION: > > Sorry Baptiste. I mistyped your name in my previous email. > > Thanks, Q.Xie > > > On Tuesday, November 18, 2014 11:37 PM, Qingshan Xie <[email protected]> > wrote: > > > I configured my HAProxy to use 'reqirep' to replace the Host header from > site A.site.com to B.site.com as below, > > backend SFARM-PROXY > reqirep ^Host: Host:\ B.site.com > server Proxy B.site.com:80 > > When I tested it by accessing A.site.com/xyz, HAProxy redirected it to > B.site.com/xyz in the first time. its log shows 302. but on the same > browser, I typed A.site.com/xyz, HAProxy did not redirect it and log showed > 200. It's reproducible. Can someone explain it? > > Thanks, Q.Xie
Hi Qingshan, Well, the configuration you proposed should work. Could you copy your whole configuration ? I'll propose you a few improvement to log some useful information that will be helpful for troubleshooting. In the mean time, I recommend you to read this blog page: http://blog.haproxy.com/2014/04/28/howto-write-apache-proxypass-rules-in-haproxy/ Baptiste

