We help IT Professionals succeed at work.

How do I set up ip aliases for virtual web servers?

keeff
keeff asked
on
Medium Priority
228 Views
Last Modified: 2010-03-17
I am new to Linux (just installed it few weeks since) and I want to get the machine to answer to additional ip addresses and run virtual servers with apache.  Is there a comprehensive guide to this anywhere?  I have read the mini-HowTo on ipaliasing but its not very clear to me (being a newbie!)  and I really need a step-by step guide.  I haven't a clue how to re-compile the kernal or set up modules.  Any help appreciated.
(I am using the latest Debian distribution).

Comment
Watch Question

Commented:
I assume you are on an ethernet line -- use ifconfig to alias IP's (see man ifconfig for more info) and use the Apache httpd.conf (pico it) and its VERY self-explanatory -- simply add the hostnames you want it to answer to...

Tell me if this helps...

-- VSD

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
I used
ifconfig eth0:0 xxx.xxx.xxx.xxx

and got
SIOCSIFADDR: NO such device

I understand this has something to do with the kernel or a missing module, but I don't know where to start with this.

Commented:
Hmmmm..... ifconfig eth0:1 xxx.xxx.xxx.xxx

Try that

Author

Commented:
Just did...  exactly the same thing happened!

Commented:
I am on BSDI -- so I may be wrong, but take a look at man ifconfig, specifically the ALIAS option -- see if that helps anything...

I think thats what you need :)

Author

Commented:
Can't find any reference to an ALIAS option in man ifconfig - must be differant on this system.


Commented:
What is the system you're using?  Linux?

Author

Commented:
Debian Linux 1.3 distribution
idconfig options are:
interface, up, down, [-]arp, [-]trailers, [-]promisc, [-]allmulti, metric N, mtu N, dstaddr addr, netmask addr, irq addr, [-]broadcast addr, [-]pointtopoint addr, hw, multicast, address
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.