Hi Dan,
On Thu, Dec 20, 2007 at 11:27:42AM -0700, Dan Zubey wrote:
> Yes you can.
>
> Check out http://haproxy.1wt.eu/download/1.3/doc/configuration.txt
>
> There are more conditional options than you probably will ever need.
>
> In your case, you probably want something like
>
> acl toto-acl hdr_dom -i www.toto.com
> acl test-acl hdr_dom -i www.test.com
> acl bar-acl hdr_sub bar
>
> (I'm not positive about the last one, but should work)
It was nearly that, you just forgot to name the headers on which the match had to be performed :-)
acl toto-acl hdr(host) -i www.toto.com acl test-acl hdr(host) -i www.test.com acl bar-acl url_sub bar
use_backend toto if toto-acl use_backend test if test-acl use_backend bar if bar-acl
I generally suggest to name ACLs with something more explicit, such as "host-toto" and "url-bar" as it will make it easier to debug your configs.
I'm currently in the process of completing the documentation. It also gives a very quick overview of HTTP (most notably differences between keepalive and close), and defines a little bit of vocabulary because I noticed that the old doc was very confusing. The new one should be far better in this respect.
BTW, Florian, please ensure that you are running version 1.3 (preferably between 1.3.12.4 and 1.3.14). The ACLs and content switching does not exist in version 1.2.
Regards,
Willy
Received on 2007/12/20 22:10
This archive was generated by hypermail 2.2.0 : 2007/12/20 22:15 CET