[Gllug] Question on mod_rewrite

Doug Winter doug at pigeonhold.com
Mon Sep 22 09:44:57 UTC 2003


On Mon 22 Sep Simon Morris wrote:
> The idea is to use Apache to provide a reverse proxy in front of
> multiple webmail servers. When a user goes to
> http://webmail.domain.com/smorris Apache would take the username
> (smorris) and perform a LDAP lookup. Based on the result it would then
> reverse proxy the request to the correct backend server.

Are you not overcomplicating this?  You could probably come up with
something a lot simpler (assuming all you wish to do is balance load,
and you don't actually mind which server each users mailbox is on).

You could have 26 DNS aliases for servers, one for each letter of the
alphabet.  These could map to however many servers you actually have,
so:

    a.domain.com -> server1.domain.com
    b.domain.com -> server1.domain.com
    c.domain.com -> server2.domain.com

And then just use the first letter of their username to determine the
server to direct them to.  A bit of a kludge, but much more robust than
using a more complex database :)

doug.

-- 
6973E2CF print 2C95 66AD 1596 37D2 41FC  609F 76C0 A4EC 6973 E2CF
"If you are the type of person who likes assault weapons, there
is a place for you - the United States Army. We have them."
   -- General Wesley Clark, responding to a question on gun control

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20030922/fc6b290e/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug


More information about the GLLUG mailing list