[olug] Apache2 config on Debian-which site is the default

Shawn L. Djernes shawn.djernes at ncbvi.ne.gov
Wed Nov 23 15:34:00 UTC 2005


It's a three step process.

1. It looks for a NameVirtualHost configuration and if found uses that.
2. It looks for a VirtualHost based on IP address the request came in on.
3. It uses the first file loaded.

Shawn

-----Original Message-----
From: olug-bounces at olug.org [mailto:olug-bounces at olug.org] On Behalf Of Kenton Brede
Sent: Wednesday, November 23, 2005 8:50 AM
To: Omaha Linux User Group
Subject: Re: [olug] Apache2 config on Debian-which site is the default


On 11/23/05, Dave Thacker <dthacker9 at cox.net> wrote:
> On Debian Sarge, apache2 is installed in /etc/apache2.  Below that are two
> other directories, sites-available and sites-enabled.  The idea is that your
> virtual hosts are configured in sites available, and seen by apache2 when you
> place a symbolic link to them in sites-enabled.   Does anyone use this setup?
> How does apache decide which file contains the default site?

You can put all your virtual hosts in the one default file included or
break them up by site.  I like to have each vhost in it's own file.

I'm not entirely sure how Apache decides on the default site but since
the symlink for the default is "000-default" I'm assuming it assigns
based on the first file found.  Of course my assumptions often end up
being wrong :)  Perhaps it also looks for "NameVirtualHost?"
Kent

--
"Every person takes the limits of their own field of vision
  for the limits of the world." - Arthur Schopenhauer
_______________________________________________
OLUG mailing list
OLUG at olug.org
http://lists.olug.org/mailman/listinfo/olug






More information about the OLUG mailing list