Using multiple IP addresses for serving

Apr 05, '01 10:29:40AM

Contributed by: Anonymous

IP aliasing allows your server (or more accurately your interface card) to respond to more than one IP address.

I like to use a mixture of header based IP and real or aliased IP addresses, meaning that a number of URL's point (in DNS) to the same IP number, and other URL's have their own IP address.

eg
www.foobar.com -> 174.32.3.52
www.foobar2.com -> 174.32.3.52
www.foobar3.com -> 174.32.3.52

www.different.com -> 174.32.3.60

To do this, your interface device has to recognise and listen for the different IP numbers. This is done via IP aliasing.

Using the ifconfig command in OSX/BSD appears to be different from Linux.

Instructions for the syntax to do this is over on the Stepwise site.

Linux instructions for IP aliasing are available at Linux Documentation Project

You will also need to add listen directives to the apache config file - this is covered else where on this site.

Comments (0)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2001040510294060