[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Virtual Hosting and the FHS

On Wed, 11 Jul 2001 05:29, Craig Sanders wrote:
> whatever policy you decide on for your system, make it consistent...that
> will allow you to automate just about every aspect of creating or
> maintaining virtual hosts. e.g. because all vhosts are set up according
> to my policy, i only have to edit one line in one config file and
> run "make" to create or change any virtual host...a tedious job now
> takes only a few seconds with almost all chances for operator-error
> eliminated.

Why not use vhost_alias_module in Apache and something like the following:
VirtualDocumentRoot /home/www/%-1/%-2/%-3/%-4+

Then have the home directory for the main user be /home/www/au/com/company .  
Then the user can login through ftp, create a directory named "www" for 
storing the www.company.com.au site, then they could create a directory 
"sales" to create the sales.company.com.au site etc.  Then the only thing you 
need to solve is automatic creation of BIND configuration to match.

Then for the logging you can have the following at the start of the Apache 
LogFormat "%V %h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\" %T"

Which allows you to produce a single log file with coherant information on 
all domains.  My logtools package has everything you need to split up and 
manipulate the log file generated.  I can supply some sample scripts (I'll 
put them in the next version of logtools) to automatically create webalizer 
stats for all domains dynamically.

http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page

Reply to: