Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 33273 invoked from network); 15 Sep 2009 15:36:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Sep 2009 15:36:17 -0000 Received: (qmail 42566 invoked by uid 500); 15 Sep 2009 15:36:13 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 42547 invoked by uid 500); 15 Sep 2009 15:36:13 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 42538 invoked by uid 99); 15 Sep 2009 15:36:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2009 15:36:13 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ro0ot.w00t@googlemail.com designates 209.85.219.206 as permitted sender) Received: from [209.85.219.206] (HELO mail-ew0-f206.google.com) (209.85.219.206) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2009 15:36:01 +0000 Received: by ewy2 with SMTP id 2so624757ewy.41 for ; Tue, 15 Sep 2009 08:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=5gyXZjCCCrPUIANnAR5/a4AHw3tnR+kexon+Z0nftTY=; b=LaZ5uRvuV717qyBytrRkArDUXk11lBdoomoQQUnbsegyqS1n2RGSEIFGrKOyj6+kFf KaHgYjhsHpGef/JWOqawvxeBEMPKTRONEGrdHdpIEF4WR8RxIvX0Po3jrzlnDUhvCd3x 4LaUCt5fRSR53/HdwWOgzpbF9wDwVFWG4BgYA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=skGzMkrujdt/5XOTDOuh39jIXDwKx7mSfWogYQBPpNsZmPHoA9ht6VcyR+2yb2mYMP yc39WRU0Dn0z7LMcDhIPs1xQeJZvWKlu3EYQdgrp69mUJl2ThMJU5dTbpxHMsiGwc03f LrXH8SVg2XpYycYVjcodYWnL0JhsEyyS/fmIM= MIME-Version: 1.0 Received: by 10.211.128.6 with SMTP id f6mr8701389ebn.15.1253028880808; Tue, 15 Sep 2009 08:34:40 -0700 (PDT) In-Reply-To: <46055D84-1B58-4F52-9B3C-4A6CA6B57623@kreme.com> References: <4AAF3BE9.9080705@redcor.ch> <6ed6382b0909150054s58e43a8dyc9d7237a2a7655f0@mail.gmail.com> <46055D84-1B58-4F52-9B3C-4A6CA6B57623@kreme.com> Date: Tue, 15 Sep 2009 17:34:40 +0200 Message-ID: From: "Jan G.B." To: users@httpd.apache.org Content-Type: multipart/alternative; boundary=00504502cfc355825904739f857f X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] Re: how do I *define* a default virtual host --00504502cfc355825904739f857f Content-Type: text/plain; charset=ISO-8859-1 2009/9/15 LuKreme > On 15-Sep-2009, at 01:54, Krist van Besien wrote: > >> On Tue, Sep 15, 2009 at 9:02 AM, robert rottermann >> wrote: >> >>> hi ther, >>> I load my VH's from a directory with a number of VH's >>> >>> is it possible to define which one is the default one? >>> >>> it seems to select the first in alphabetical order. >>> >> >> I asume you have one config that pulls in the VH's configs via an >> include statement. Something like: >> >> Include /etc/httpd/vhosts/*.conf >> >> In that case they are indeed loaded in alphabetical order, as that is >> the way the OS sorts files by default. >> > > I always put my default VirtualHost directly into the httpd.conf file, just > before the Include line. > > This way there is no question about which directive is the default, and I > am not dependent on filename order. > > > I'd say this way it's always unclear which is the default vhost. As you have to dig through instead of just issuing a `cat /etc/apache2/sites-enabled/*` or just `ls`. As the example shows, there's also no easy way of disabling the vhost on-the-fly (ie: rm ). ;-) Regards. --00504502cfc355825904739f857f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2009/9/15 LuKreme <= kremels@kreme.com>
On 15-Sep-2009, at 01:54, Krist van Besien wrote:
On Tue, Sep 15, 2009 at 9:02 AM, robert rottermann <robert@redcor.ch> wrote:
hi ther,
I load my VH's from a directory with a number of VH's

is it possible to define which one is the default one?

it seems to select the first in alphabetical order.

I asume you have one config that pulls in the VH's configs via an
include statement. Something like:

Include /etc/httpd/vhosts/*.conf

In that case they are indeed loaded in alphabetical order, as that is
the way the OS sorts files by default.

I always put my default VirtualHost directly into the httpd.conf file, just= before the Include line.

This way there is no question about which directive is the default, and I a= m not dependent on filename order.


I= 'd say this way it's always unclear which is the default vhost. As = you have to dig through <config_file> instead of just issuing a `cat = /etc/apache2/sites-enabled/*` or just `ls`.

As the example shows, there's also no easy way of d= isabling the vhost on-the-fly =A0(ie: rm <symlink>). ;-)
Regards.

=A0
--00504502cfc355825904739f857f--