HTTP virtual host question

Hello,

We are running  webserver on production and during the DR we need to put diffrent IP address in the vurtual host httpd.conf file.  Can we automate without touching the httpd.conf file?
mokkanAsked:
Who is Participating?
 
mokkanAuthor Commented:
Thank you what we did we changed the informaiton on PROD to point it to hostname instead and IP and did FC and worked.
0
 
Chris HInfrastructure ManagerCommented:
Create two files httpd.1 httpd.2
Set the ip adress in .1 to your normal production IP
Set the ip adress in .2 to your DR IP
Create 2 scripts, one which copies httpd.1 to httpd.conf and vice versa.
Schedule 2 cron jobs or launch the scripts manually.

What distro is it?
0
 
mokkanAuthor Commented:
The problem is we do San copy before we launch Apache instance. DR servers will have same httpd.conf file as prod  and it will have prd IP. We don't want to keep 2 http Conf file.

Any other solution?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Gerwin Jansen, EE MVETopic Advisor Commented:
You don't want to touch httpd.conf AND you don't want to keep 2 httpd.conf files?

I'm thinking we should be able to do one or the other, or we can't help you further?
0
 
mokkanAuthor Commented:
Is there way  we can put the prod IP in /etc/hosts file and resolve to  DR host?
0
 
gheistCommented:
All modern browsers will connect to next server in DNS pool when one is down. I think active/passive cluster and HA at this level actually makes it less available and more complex than 2 apache servers mostly independent with small session synchronisation.
0
 
Chris HInfrastructure ManagerCommented:
we need to put diffrent IP address in the vurtual host httpd.conf file

echo. > httpd.conf
echo new contents of file >> httpd.conf

This is pretty cut and dry.
0
 
mokkanAuthor Commented:
Thank you all
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.