Forum Moderators: phranque

Message Too Old, No Replies

Move to new IP Address - Run Two Concurrently

         

Frank_Rizzo

10:49 am on Jul 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Web hosters are moving dedicated servers to a new IP address range. They have allocated me a new IP and they say that I can run the old and the new until end of July when only the new one will be available.

That's fair enough but how can I configure apache to run from two IP addresses?

I have two virtual servers on one dedicated server. They all use the same IP address.

Current:

IP 111.111.111.111
Virtual servers: widgets.co.uk, widgetspares.co.uk

What they say I should do is to set the server up to accept both IP's:

IP 111.111.111.111 or IP 222.222.222.222
Virtual servers: widgets.co.uk, widgetspares.co.uk

How do I do that?

I can't see where in the httpd.conf I can do that. All I have in that file is:

------------------------------------
Listen 111.111.111.111

NameVirtualHost 111.111.111.111

<VirtualHost 111.111.111.111>
ServerName widgets.co.uk
(other stuff)
</VirtualHost>

<VirtualHost 111.111.111.111>
ServerName widgetspares.co.uk
(other stuff)
</VirtualHost>
-----------------------------------

Do I just duplicate the Listen, and Virtual Host 111 entries? Set the duplicate to 222.?

What about the linux network configuration? I need to set this up for two IP's and I also need to change the gateway and DNS settings.

Server Apache 2.0.52
Linux Centos 4.3

[edited by: Frank_Rizzo at 10:49 am (utc) on July 13, 2006]

zCat

10:54 am on Jul 13, 2006 (gmt 0)

10+ Year Member



For Apache you just need to add enough Listen directives e.g.

Listen 127.0.0.1:80
Listen 192.168.0.1:80

Or just simply

Listen 80

and Apache will listen on all available network interfaces.

Added:

Do your virtual hosts like this:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName widgets.co.uk
(other stuff)
</VirtualHost>

[edited by: zCat at 10:56 am (utc) on July 13, 2006]

zCat

8:50 am on Jul 22, 2006 (gmt 0)

10+ Year Member



Was this any use?

just wondering...