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

Re: apache2 configuration question



On Sat, Sep 03, 2005 at 03:17:34PM -0400, Angelo Bertolli wrote:
> 
> Well I haven't tried the "unless I have a subdomain defined" part but I think 
> it would work something like this:
> A vhost for your domain
> A vhost for each subdomain you want
> A vhost for *.domain
> 
> But they have to go in that order!  In other words, if you're using Debian's 
> (crazy) a2en-site stuff, and you put all these definitions in different files, 
> you might not get them in the right order.  So, I would make one file for the 
> vhost definitions for this particular domain and just list them in the order 
> you want.
> 

Thanks for the tip.  It actually ended up being the reverse order.
Apache considers the first virtual host it encounters to be the
"default" unless another is specified in the main server config.  Since
apache2 doesn't have any server config by default in the main part of
the configuration, it is the first virtual host.  The first virtual host
then catches all requests that don't go to another vhost.  It also took
a while to get the config just right, as apache is very particular about
how it parses configs.

-Roberto

-- 
Roberto C. Sanchez
http://familiasanchez.net/~roberto

Attachment: pgpEL2C_ssCey.pgp
Description: PGP signature


Reply to: