[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-security] VHOST over two IP's?
- Subject: Re: [cobalt-security] VHOST over two IP's?
- From: Jeff Lasman <jblists@xxxxxxxxxxxxx>
- Date: Thu, 03 Oct 2002 12:00:26 -0700
- Organization: nobaloney.net
- List-id: Mailing list for users to address network security on Cobalt products. <cobalt-security.list.cobalt.com>
David Smulsky wrote:
> Is there a way to make a vhost listen to two IP's at once?
Yes.
> Cause we are switching IP's, and wanted to have as little downtime as
> possiable.
Good reason...
> we use a raq550 btw..
Oh, you actually wanted instructions.... okay...
Are you doing this for all your virtual hosts? If so it's actually
quite easy:
Copy all the virtual host blocks from /etc/httpd/conf/httpd.conf; they
begin with the first instance of:
NameVirtualHost 63.108.93.101
<VirtualHost 63.108.93.101>
ServerName www.nobaloney.net
and end with the last:
</VirtualHost>
(IP#s are just an example; these lines come from my own virtual host
block for nobaloney.net).
and create a new file called "oldip.include". Paste all of this into
the new file.
LEAVE the original lines in the /etc/httpd/conf/httpd.conf file, and at
the bottom of the file add the line:
Include /etc/httpd/conf/oldip.include
Then do a global change on /etc/httpd/conf/httpd.conf, changing all the
old IP#s to the new ones.
Then reload httpd as follows:
# /etc/rc.d/init.d/httpd reload
That's it.
In a week or so, delete the oldip.include file, remove the Include line
from the bottom of the httpd.conf file, and reload httpd again:
# /etc/rc.d/init.d/httpd reload
to clean up your system.
Jeff
--
Jeff Lasman <jblists@xxxxxxxxxxxxx>
Linux and Cobalt/Sun/RaQ Consulting
nobaloney.net, P. O. Box 52672, Riverside, CA 92517
voice: +1 909 778-9980 * fax: +1 909 548-9484