Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I'm happily using HAProxy to load balance 2 web servers serving a single service. Now I need to add 5 more web servers that will respond to 5 different hostnames and I need to use the same frontend as above.

I tried to use ACL with no luck.

I have a test client with hosts file compiled with all hostnames pointing at haproxy and i used something like the following in the frontend:

acl hw1 hdr_beg(host) -i hw1.test.lan 

use_backend back_hw1 if hw1

Then I set a back_hw1 backend server but it never seems to match and I get "no response from server" when I try.

All web servers use HTTPS and I correctly set SSL in HAProxy when I setup the first service.

Thanks for any help.

share|improve this question
I've tried many acls but i can never seem to match them and i always end up in the default backend. I can post config if you guys need it but i can't seem to be able to match a very simple acl... – Andrea May 19 '13 at 16:29
yes plz post the config – APZ May 19 '13 at 17:32

Instead of using hdr_beg with what seems to be the FQDN, try hdr_dom(host).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.