Virtual interface/Virtual web hosting

Virtual interface/Virtual web hosting

Post by Fred R. Marti » Fri, 24 Jan 1997 04:00:00



I need to host virtual websites on a server with a single ethernet
interface.  I am using Kernel 2.0.27 but I did not compile this myself
and am not sure which options and modules are present.

I understand that IP aliasing is possible as well as networking
aliasing; but I do not know if these are patches, modules, or are part
of my existing kernel.

I have seen commands such as:
/sbin/ifconfig eth0 alias www.domain.com
/sbin/if config eth0:0 up
etc.  

but I am rather new to Linux and need more detail
(spell it out for me....please)
I have read the mini-How to on virtual hosting.  It wasn't enough.
                                Thanks in advance, Fred

 
 
 

Virtual interface/Virtual web hosting

Post by Florian Ran » Fri, 24 Jan 1997 04:00:00


#!/bin/sh
echo "set ip_alias"

/sbin/ifconfig eth0:1 <IP> netmask <YOUR NETMASK> broadcast
<YOURBROADCAST>

echo "route ip_alias"
/sbin/route add <IP> eth0:1

--
**********************************************************
CYWARE Neue Medien GmbH (Florian Rang)
fon/fax : ++49 6223 9206-41/21


internet: http://www.cyware.com

 
 
 

Virtual interface/Virtual web hosting

Post by B.A.McCau.. » Fri, 24 Jan 1997 04:00:00



Quote:>I need to host virtual websites on a server with a single ethernet
>interface.  I am using Kernel 2.0.27 but I did not compile this myself
>and am not sure which options and modules are present.

>I understand that IP aliasing is possible as well as networking
>aliasing; but I do not know if these are patches, modules, or are part
>of my existing kernel.

Just recompile it then you will know what options are in.

Alternatively just try to do it.  If you get complaints about non-
existant devices when you try to use IP alais you can reasonably
asssume your kernel was built without it.

Quote:>I have seen commands such as:
>/sbin/ifconfig eth0 alias www.domain.com
>/sbin/if config eth0:0 up

On Linux ?

/sbin/ifconfig eth0:0 www.domain.com

Quote:>I have read the mini-How to on virtual hosting.  It wasn't enough.

I'm not quite sure what you mean.  If you've already got step by step
instructions and are still having problems you'll have to *show* us.
Don't just *tell* us *show* us.  Use the "script" command and
illustrate your problems giving *all* relevant infomation.

--

 .  _\\__[oo       from       | Phones: +44 121 471 3789 (home)

.  l___\\    /~~) /~~[  /   [ | PGP-fp: D7 03 2A 4B D8 3A 05 37...
 # ll  l\\  ~~~~ ~   ~ ~    ~ | http://wcl-l.bham.ac.uk/~bam/

 
 
 

Virtual interface/Virtual web hosting

Post by Alvin O » Sun, 26 Jan 1997 04:00:00


hi ya

try looking at my "virtual domain setup examples"
        http:/www.linux-consulting.com/FAQ_virtual

-------------------------------------------------------------------------

RING, Inc,              http://planet.fef.com    www.Linux-Consulting.com
-------------------------------------------------------------------------


: I need to host virtual websites on a server with a single ethernet
: interface.  I am using Kernel 2.0.27 but I did not compile this myself
: and am not sure which options and modules are present.

: I understand that IP aliasing is possible as well as networking
: aliasing; but I do not know if these are patches, modules, or are part
: of my existing kernel.

: I have seen commands such as:
: /sbin/ifconfig eth0 alias www.domain.com
: /sbin/if config eth0:0 up
: etc.  

: but I am rather new to Linux and need more detail
: (spell it out for me....please)
: I have read the mini-How to on virtual hosting.  It wasn't enough.
:                               Thanks in advance, Fred

 
 
 

Virtual interface/Virtual web hosting

Post by Fred R. Marti » Mon, 27 Jan 1997 04:00:00



> try looking at my "virtual domain setup examples"
>         http:/www.linux-consulting.com/FAQ_virtual

> : I need to host virtual websites on a server with a single ethernet
> : interface.  I am using Kernel 2.0.27 but I did not compile this myself
> : and am not sure which options and modules are present.

> : I understand that IP aliasing is possible as well as networking
> : aliasing; but I do not know if these are patches, modules, or are part
> : of my existing kernel.

I have found some answers myself.  To see if an option is configured in
the kernel check /usr/src/linux/.config
This file was used at compile time to configure the kernel.  It is
invisible.  To ls it you need to use the ls -a form of the command. You
may then less or more the file (do not edit it directly) to see which
options were chosen.

Although the mini how to on virtual web hosting did not solve my
problem,  The mini how to on IP Aliasing did help.  Thanks to all who

 
 
 

1. For Discussion: web virtual hosting vs mail virtual hosting

Hello,

I am the SysAdmin for a small webhosting/colocation compny, and we are in
the midst of re-designing our network, particularly our mail servers.
While in one of our discussions regarding failover load-balancing, and
interesting question was brought up:

Is it possible to have the mail boxes in different locations on the
server, and direct the user to their mailbox based on the domain?

Let me explain what I mean, using our web servers as an example (yes, I
know that HTTP and mail are different protocols, but please bear with
me)...

We have two Linux web servers, let's say IP addresses of '192.168.1.1' and
'192.168.1.2'.  Each server is setup to listen on each IP address.

Each domain we setup is setup on one of the servers as it's "primary"
server, where the files are stored served from the local hard drive.

The site is then setup on the other server, which would server the site
off an NFS mount from an NFS server (the NFS server uses 'rsync' at
midnight each night to grab the updates/changes from the web servers
themselves).

The VirtualHost entries would look like this:

Primary:
<VirtualHost 192.168.1.1:80>
    DocumentRoot /websites/[0-9,a-z]/customerdomain.com
    ...
</VirtualHost>

Secondary:
<VirtualHost 192.168.1.1:80>
    DocumentRoot /nfs/websites/[0-9,a-z]/customerdomain.com
    ...
</VirtualHost>

Our router is then setup with "priority load balancing": it knows that if
the host header contains 192.168.1.1, to go to Server A (which serves up
the site locally), but if he is down, go to Server B (which serves the
site off the NFS mount).  Of course, the advantage to this setup is that
we could lose either server, and still be fine (some people just would not
be able to FTP their site chanes), *or* we could lose the NFS server, and
still be okay.  Of course, if we lost a server *and* the NFS server, then
we piss off half of our customers :-)

So, now for the questions:

  1. Is something similar possible for mail servers (it's not so much the
contents of the email directories I would care about as much as the
existence of the mailboxes themselves)
  2. If not possible (and I am almost sure it is not), what is the reason?
 I would guess it is the different way the protocols work.  Is there
material you could point me towards to learn about htis (the RFC's??)

TIA for your patience regarding this slightly off-topic post... :-)


2. mozilla and java plugin

3. Apache 1.3b2: Default Host and all virtual hosts serve only first virtual hosts pages?

4. Please help! Teacher trying to set up a MUD using Linux and Novell.

5. Virtual Host/Virtual Interface for NSCA HTTPD 1.5

6. Threads FAQ

7. FrontPage virtual hosting, removal or reset of virtual host

8. How to stop output from cron command

9. : How to prevent one named virtual host from "seeing" another virtual hosts files ?

10. Mixing Apache Name Based Virtual Hosts and SSL Virtual Host

11. Virtual hosts/virtual IP

12. Name Based Virtual Hosting - Unable to access Virtual domain from IE/Lynx

13. Virtual Server vs. Virtual Host