Link to home
Start Free TrialLog in
Avatar of mokkan
mokkan

asked on

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?
Avatar of Chris H
Chris H
Flag of United States of America image

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?
Avatar of mokkan
mokkan

ASKER

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?
SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mokkan

ASKER

Is there way  we can put the prod IP in /etc/hosts file and resolve to  DR host?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mokkan

ASKER

Thank you all