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

Re: apache2: clearing the air [please read]

nwp@lemon-computing.com (Nick Phillips)  wrote on 12.10.01 in <[🔎] 20011012103800.E12292@lemon-computing.com>:

> On Thu, Oct 11, 2001 at 10:39:12PM -0400, Colin Walters wrote:
> > > 	What about the concept of working with the already establish'd
> > > directory system and just making it vhost aware?
> > >
> > > 	* /var/www/the.host.name/ - document root for that host
> > > 	* /usr/lib/cgi-bin/the.host.name - CGI scripts for that host
> > > 	* /var/log/apache/the.host.name - logs for that host
> > >
> > > 	This works with the current system and should not cause
> > > problems while attempting to maintain FHS and policy guidelines.
> It's actually not possible to have a virtual hosting system inside /var/www
> that properly works "with the current system" - you end up putting all
> sorts of sh*t inside the current system's webroot.

It's what we do at work. The default root is only used for people without  
Host: some-defined-host, and the only halfway useful thing there is a HTML  
file listing all defined hosts (generated by a perl script, together with  
all other vhost stuff, from a small config file listing vhosts and what  
kind of config to use for them (such as should there be a subdirectory,  
should they be an alias to another vhost, and so on)). Alternatively, one  
could put there an index.html file saying "you did not chose the right  
host name, go away", of course ...

Incidentally, IIRC, our standard vhost setup has, for all vhosts (this  
takes cooperation from DNS, of course), http://vhost.dom/path  
automatically redirect to http://www.vhost.dom/path - some people would  
probably prefer to go the other way around, of course. Canonical URLs are  
good, and having both with and without "www." work is also good, IMAO, and  
this is how to get both at the same time.

MfG Kai

Reply to: