Re: Problem: host header keeps the IP of the HAProxy server

From: Ran S <ran#sheinberg.net>
Date: Sun, 14 Aug 2011 13:31:57 +0300


Hi Cyril,

I see, thanks for that.
So, will the correct way be to configure two different backends and include the reqrep for each one of them.
But how will I get the listen or frontend node to load balance between two different backend nodes? I can't find the configuration to do that... is it possible?

Thanks

2011/8/14 Cyril Bonté <cyril.bonte#free.fr>

> Hi all,
>
> Le Sunday 14 August 2011 10:19:04, Ran S a écrit :
> > I don't know what's going on, this doesn't seem to work.
> >
> > With this configuration the header gets changed:
> > backend test_servers
> > server 118 172.31.0.118:85 id 118
> > reqrep ^Host:\ 172.31.0.104 Host:\ 172.31.0.118
> >
> > But once I add the IF, it breaks and the header does not get changed!
> > backend imp_servers
> > server 118 172.31.0.118:85 id 118
> > reqrep ^Host:\ 172.31.0.104 Host:\ 172.31.0.118 if { srv_id 118
> }
> >
> >
> > What am I doing wrong?
>
> reqrep can't be used with the "srv_id" acl : the server is only known late
> in
> the request processus, after the headers manipulation, which makes your
> condition never match.
> Sorry to say that you can't do it like this.
>
> --
> Cyril Bonté
>
Received on 2011/08/14 12:31

This archive was generated by hypermail 2.2.0 : 2011/08/14 12:45 CEST