Re: Need help about reqrep (urgent)

From: Cyril Bonté <cyril.bonte#free.fr>
Date: Sat, 24 Sep 2011 14:35:25 +0200


Hi all,

Le Samedi 24 Septembre 2011 12:43:35 Willy Tarreau a écrit :
> Hi,
>
> On Fri, Sep 23, 2011 at 11:20:52AM +0000, DerekLiao wrote:
> > backend cs_aaa_caipiaos_1
> >
> > reqrep
> >
> > ^([^\ ]*)\ /kaijiang(/.*) \1\ /result_aaa\2
> >
> > option httpchk GET / HTTP/1.1\r\nHost:\ www.bbb.com
> >
> > server srv_aaa_caipiaos_1_01 www.bbb.com:80 check
>
> Are you sure that your server does not also consider the Host
> header and refuses to serve /result_aaa from caipiao.aaa.com ?

I take the thread at the top because for me Willy is right from the beginning. Your issue is probably not in your reqrep line but because you don't modify the Host header before sending the request to the remote server (as you do in your "httpchk" test).

You should try to add a second reqrep (or reqirep) to change the host : reqirep ^Host: Host:\ www.bbb.com

> > when I access caipiao.aaa.com/kaijiang, I get a 404 error, looks like
> > reqrep did not working~

And this is probably due to the fact that you try to contact a virtualhost caipiao.aaa.com on the remote server, which doesn't exist.

-- 
Cyril Bonté
Received on 2011/09/24 14:35

This archive was generated by hypermail 2.2.0 : 2011/09/24 14:45 CEST