Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

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.