1832304 Members
2195 Online
110041 Solutions
New Discussion

MC/sg and apache

 
SOLVED
Go to solution
Franz Hillebrand
Occasional Contributor

MC/sg and apache

Hi.

I have a question.

A customer wants to have a 2 node cluster with 4 packages. Each packages present a apache web server on his floating IP. Each appache should be listen on port 80.

My question now is:

How can i cover this with apache?
Must i configure all 4 IP addr. in each apache config files and oly the fact where the floating IP is, decide the server.

I'am sorry for the question, but i dont know apache well.

How can i cover this
Shit happens......
5 REPLIES 5
Steven Sim Kok Leong
Honored Contributor

Re: MC/sg and apache

Hi,

How do you have 4 different apache packages that all listen at service port 80 in a cluster? You can only have one single apache package in a single cluster that fails over from primary node to secondary node during a failure.

One scenerio that works for 4 different apache packages is that you use a different service port number for each of the packages ie. ports 80, 81, 82 and 83. In that case, when any of the apache packages fail over, there will be no conflict of port bindings and you will not encounter "Port already in use" errors.

Hope this helps. Regards.

Steven Sim Kok Leong
Franz Hillebrand
Occasional Contributor

Re: MC/sg and apache

SOrry, but this doesnt help, but descripe my problem.

I do not have a active/passiv configuration. I have activ/activ.

Have anyone a idea how i can handle this. Both must be (!) on port 80. Configuration from apache?

Can i bind a seperate port 80 to the flotting ip (i think i cant because its the same physical interface, but maybe i think wrong).
Shit happens......
Steven Sim Kok Leong
Honored Contributor
Solution

Re: MC/sg and apache

Hi,

Even with an active/active ServiceGuard configuration, it is NOT possible to have two apache web servers binding to the same port 80 when one of the package fails over from the primary node to the secondary node.

Even with virtual hosts defined in your apache configuration file, you still need to failover and restart the apache to re-read the updated apache configuration file on the failover server. This will cause problems to currently running virtual hosts on the surviving node.

I believe that if you want 4 apache packages in a cluster, you will need 4 different port bindings (eg. 80, 81, 82, 83). If you insist on only port 80, note that you cannot bind two apache webservers to the same port 80. You can consider the virtual hosting option but it would mean that you will have to customize your ServiceGuard configuration heavily, that it is unlikely to be a supported configuration and that a failover of the primary node will cause a momentary disruption to existing packages on the failover node.

Hope this helps. Regards.

Steven Sim Kok Leong
CPHVF-U Guard
Advisor

Re: MC/sg and apache

As I understand this, the answer is maybe :-)

You have one shared VG/virtual IP.
The config-files are located in each shared VG.
Use the following in each config-file: (httpd.conf)
BindAddress virtual-node-name
Listen virtual-node-name:80

I must say, I havent tried this, but I belive it should work.

/Kristian.
Oliver Wriedt
Valued Contributor

Re: MC/sg and apache

Kristian is right !
We are using two Apache on the same port
with bind on different virtual IP, no problem.
Regards
Oliver