LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-07-2011, 10:56 PM   #1
tranen
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
Lightbulb Apache Balancer & Heartbeat


favorite


Hi

I'm using apache as a load balancer, I try to use heartbeat with it. To do this I have 2 load balancers with different IP adresses. This is my configuration :

In the file /etc/ha.d/ha.cf :

logfile /var/log/ha-log
bcast eth0
keepalive 2
warntime 10
deadtime 30
initdead 120
udpport 694
auto_failback yes
node apache-balance-1
node apache-balance-2
uuidfrom nodename
respawn hacluster /usr/lib/heartbeat/ipfail

In /etc/ha.d/haresources : (I'm not sure about this IP address, does it need to be real or virtual?)

apache-balance-1 192.168.1.51 apache2

In /etc/ha.d/authkeys :

auth 2
2 crc

Then I configure apache to listen on the vip. edit /etc/apache2/ports.conf on both load balancers: Listen 192.168.1.51:80 -> when I put this line on the file, apache do'nt want to start again.

Does everything ok? To test it I shutdown the IP address of the balance-1 but nothing work anymore, do you know why? The configuration or the test?

Thank you
 
Old 03-15-2011, 06:29 PM   #2
roreilly
Member
 
Registered: Aug 2006
Location: Canada
Distribution: Debian, Slackware
Posts: 106

Rep: Reputation: 28
If I recall correctly, the IP in haresources is the shared virtual IP.

In ports.conf, do not use a specific IP. just use the port(s) you want apache to serve on if you want apache to start at any time.

if your ports.conf looks like this:

Listen 192.168.1.51:80

Then apache will refuse to start if that IP is not available, meaning that only the active server will start apache.

The standby server will only start apache once it has completed the IP takeover.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] High-Availability HTTP Load Balancer With HAProxy & Heartbeat on RHEL 5.4 vikas027 Linux - Server 2 10-17-2010 12:38 PM
LXer: High-Availability Load Balancer With HAProxy/Heartbeat On Debian Lenny LXer Syndicated Linux News 0 07-14-2009 05:20 PM
LXer: Set Up A High-Availability Load Balancer With Perlbal/Heartbeat On Debian Etch LXer Syndicated Linux News 0 01-13-2009 04:10 PM
Apache Load Balancer. nishith Linux - Networking 1 09-19-2008 08:00 AM
LXer: Setting Up A High-Availability Load Balancer With HAProxy/Heartbeat On Fedora 8 LXer Syndicated Linux News 1 03-10-2008 07:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration