httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan G.B." <ro0ot.w...@googlemail.com>
Subject Re: [users@httpd] Re: how do I *define* a default virtual host
Date Tue, 15 Sep 2009 15:34:40 GMT
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
> 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 <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 disabling the vhost
on-the-fly  (ie: rm <symlink>). ;-)

Regards.

Mime
View raw message