For Discussion: web virtual hosting vs mail virtual hosting

For Discussion: web virtual hosting vs mail virtual hosting

Post by Alan Murrel » Sat, 04 Jan 2003 01:26:55


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

We have two Linux web servers, let's say IP addresses of '' and
''.  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

The VirtualHost entries would look like this:

    DocumentRoot /websites/[0-9,a-z]/

    DocumentRoot /nfs/websites/[0-9,a-z]/

Our router is then setup with "priority load balancing": it knows that if
the host header contains, 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*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... :-)


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


Have been running 1.2b8 for a intranet and decided to move upto 1.3b2. I
have several name based virtual hosts that have been working under
1.2b8. After compiling and installing 1.3b2 my virtual hosts do not
work. In fact what happens is that even though DocumentRoot and default
server name is different, eg: pointing to /www/default,
Apache 1.3b2 will always take me to the first defined virtual host as if
it's locked to it no matter what virtual host I try to browse. What
gives? Please post and E-Mail.

In /etc/hosts for my machines IP address I have


In ../conf/httpd.conf I have;


DocumentRoot /usr/local/www/virtA
ErrorLog logs/virtA.error.log
TransferLog logs/virtA.access.log


DocumentRoot /usr/local/www/virtB
ErrorLog logs/virtB.error.log
TransferLog logs/virtB.access.log


2. Sun Sparc Station 10 and Solarsi 8.0 ?

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

4. sgen and uscsi

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

6. Lotus 1-2-3 for Unix upgrade

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

8. How does a chmod command affect login script path setting and any umask set?

9. Virtual interface/Virtual web hosting

10. Virtual Server vs. Virtual Host

11. Virtual Machines vs. Virtual Hosts - Is it possible?

12. Virtual hosts/virtual IP

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