#1  
Old 18th June 2009, 13:45
Franck Franck is offline
Junior Member
 
Join Date: Mar 2009
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default HAProxy IP vs. host routing

I have followed the high availability/load balancer tutorial, works like a charm thanks!

Problem is that I have several vhost on the backend server and HAproxy always routes to the default (in my case first) one.

On the load balancers I have in etc/hots

http1.example.com 192.168.0.102 # where192.168.0.102 is the server with mutiple vhost

I have tried in HAPROXY.cfg

server webA http1.example.com:80 cookie A check

But it still routes me to the wrong vhost (as if it was routing directly to 192.168.0.102 and not to http1.example.com)

Any idea?

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 19th June 2009, 16:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

I suggest you use Perlbal instead - it supports vhosts.
http://www.howtoforge.com/setting-up...on-debian-etch
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 19th June 2009, 16:24
Franck Franck is offline
Junior Member
 
Join Date: Mar 2009
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Thanks for the prompt reply falko. Actually I solved the problem by thinking about it a bit longer

Essentially HAProxy balances nodes only (regardless of domain) so I ended up putting the same vhost on node 1 and node 2!

My HAProxy conf is as per your tutorial and on node1/node2 I have the same

<VirtualHost *:80>
ServerName http.ndd.com
...
</VirtualHost>

Instead of having previously http1.ndd.com on node1 and http2.ndd.com on node 2 (which btw is the setting one should use when using apache mode_balancer)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is my postfix is hacked? bzzik Server Operation 21 15th July 2009 14:13
smtp is error!!! fhawk Installation/Configuration 2 7th April 2009 13:17
Postfix problem: lost connection after CONNECT from unknown fernando_torrez Server Operation 5 30th November 2007 14:17
This is %#@*&^$# embarrassing! domino Smalltalk 34 5th February 2007 21:57
I broke it.. I think.. Email in is not being delivered? edge Server Operation 1 3rd July 2006 14:22


All times are GMT +2. The time now is 02:40.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.