I didn't realise AJ had posted this to the list, copying here for the
From: adam beecher
Sent: 01 March 2005 18:26
To: 'AJ McKee'
Subject: RE: [CLUG] Apache - Operation with vhost alias
> Sites must respond to www.domain.com and domain.com (A records point
> at the web server)
>You can use %2+ for the last two parts. Obviously this won't work if you
have hostnames with more than three parts (that need separate
VirtualDocumentRoots), but you can use multiple VirtualHost blocks with
different VirtualDocumentRoots if you wish.
> VirtualDocumentRoot /usr/local/apache/vhosts/%1/%0/html
>No, this is what you're looking for:
> It also raises the question of how am I gonna handle my log files,
> currently I keep a separate log for each site. But I gateher if I use
> vhost_alias I may not be able to do that.
>Nope. There are plenty of tools out there that'll split logs though, try
Googling for combinations of the obvious keywords. You'd just run this via
cron once a day to split them out into the users logfile directories.
Alternatively, assuming mod_perl is available, you can use PerlSections to
build your VirtualHosts on the fly, perhaps using the filesystem as a map.
If you're feeling really cool you can store custom configurations for
individual hosts in an RDBMS and talk to it using DBI/DBD.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!