You'll need to use multiple use_backend statements, as in this mailing list thread:
http://www.formilux.org/archives/haproxy/0807/1215.html So: use_backend WEB1 if acl1 or acl2 or acl3 use_backend WEB1 if acl4 or acl5 or acl6 Be aware that there is also a limit of 128 arguments / configuration line. -JohnF > -----Original Message----- > From: Bernhard Krieger [mailto:[email protected]] > Sent: March 2, 2009 6:21 AM > To: [email protected] > Subject: Amount of ACLs per Backend > > Hello, > > > we are using haproxy for 1 months and it works very well :) !!!! > > > First we set up a main configuration for testing. > > We use a apache and tomcat connected through mod_jk. > > Now i want to split the requests into three backends. > > > The acls contain the following syntax: > > > acl VHOSTS1 hdr_dom(host) -i www.dom1.com www.dom2.com > > > To get o good overwiew of our domains i created over than 40 > acls, but > i getting an error after starting the proxy. > > > This happens if i using more than 30 acls in a backend. > > > use_backend WEB1 if acl1 or acl2 .. acl30 or acl40 > > > > > So i decided to create only one acl, but i getting an error too! > > starting haproxy[ALERT] 060/115647 (12911) : parsing > [/etc/haproxy/config:91]: line too long, limit: 2047. > [ALERT] 060/115647 (12911) : Error reading configuration file : > /etc/haproxy/config > > > > So i have the following questions: > 1) How many acls can i use per backend configuration > 2) Other soltuions! > > > Version: 1.3.15.7 > > > > Thank you! > > > regards > Krieger Bernhard > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > PREMIUMPROMOTIONS if PP > > > ----- Nachricht von [email protected] --------- > Datum: Thu, 26 Feb 2009 23:26:38 +0100 > Von: Willy Tarreau <[email protected]> > Antwort an: Willy Tarreau <[email protected]> > Betreff: Re: Just a small inconsistency in the docs for > listening > on multiple ports? > An: Malcolm Turnbull <[email protected]> > Cc: [email protected] > > > > Hi Malcolm, > > > > On Thu, Feb 26, 2009 at 11:45:31AM +0000, Malcolm Turnbull wrote: > >> I'm using haproxy-1.3.15.7.tar.gz for some testing and > looking at the > >> options to bind multiple ports. > >> > >> The docs imply that you can use a line such as: > >> > >> listen VIP_Name :80,:81,:8080-8089 > >> > >> But this gives me : > >> > >> [ALERT] 056/114217 (18173) : Invalid server address: ':80,' > >> [ALERT] 056/114217 (18173) : Error reading configuration file : > >> /etc/haproxy/haproxy.cfg > >> > >> However if I break up the ports using <3 per line it works fine: > >> > >> listen VIP_Name 192.168.2.83:80 > >> bind 192.168.2.83:103,192.168.2.83:102 > >> bind 192.168.2.83:104,192.168.2.83:105 > >> > >> Is this a deliberate feature change? (not a major issue but just > >> wanted to check) > > > > No it's a bug reported by Laurent Dolosor and fixed by Krzysztof > > Oledzki last month, it's just that I have not released a new release > > with that alone yet. I think I'll have to find some time to release > > 1.3.15.8 this week-end. If time is enough, I'll try to > also backport > > my work on the doc. > > > > If you want, you can download patch > 1d62e33b0108a1da634c1936605235635df3081d > > on the git web interface ("[BUG] Fix listen & more of 2 couples > > <ip>:<port>"). > > > > Regards, > > Willy > > > > > > > > > ----- Ende der Nachricht von [email protected] ----- > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > >

