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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

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 what we did we changed the informaiton on PROD to point it to hostname instead and IP and did FC and worked.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mokkanAuthor Commented:
Thank you all
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.