httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] how to disable default site from being served in apache2
Date Tue, 13 Jul 2010 13:42:28 GMT
On Tue, Jul 13, 2010 at 1:34 PM, Tapas Mishra <mightydreams@gmail.com> wrote:
> I am having some websites and by default a website whose vhost
> configuration is first alphanumerically is being served.
> I do not want this to happen.
> i.e. when I am typing http://192.168.1.5/
> by default a website is being served
> instead I need is some thing here which shows me different directories
> as in those directories I have different websites which I later want
> to serve.
>

When using name based virtual hosting, if no VirtualHost container has
a ServerName that matches the requested Host header, then the first
vhost encountered in the conf file is used.

Commonly, people set up the first vhost as a 'failure' vhost, that
people only visit if they request a vhost that is not configured,
which can then be used to redirect people on to the right vhost or
display an appropriate error message.

Cheers

Tom

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message