httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject RE: NameVirtualHost
Date Mon, 27 Oct 1997 18:39:34 GMT
_default_ matches any IP address not otherwise specified.

You need it whenever you want to protect yourself from accidentally
putting a new address on the machine and causing it to give the wrong
website.  For example, you get new client DNS set up, but don't have their
<VirtualHost> set up, and you go to lunch, and HotBot's crawler comes
along and indexes the client's "site" when what it'll really be indexing
is your global server (i.e. probably your ISP home page).

<VirtualHost _default_>
    ...
    # this robots.txt denies all indexing
    RewriteRule /robots.txt	-
    RewriteRule /(.*)		/not-here-yet.html
    ...
</VirtualHost>

You also need it to completely emulate pre Apache 1.3 behaviour.

Dean


On Sun, 26 Oct 1997, Lars Eilebrecht wrote:

> According to Dean Gaudet:
> 
> > > Seems silly since www.mainserver.com is not a virtual host in this case.
> > > It's the real host.  Thought we had bashed this one to death, but I guess
> > > not.  Still lots of confusion.
> >  
> >  Pretend there's no such thing as "the real host"... there isn't in the
> >  code.  There's just a _default_ host, and you can explicitly override it
> >  if you want.
> 
> Hmmm... as far as I understand the code the first vhost following a
> NameVirtualHost directive is used as a default if a connect on that
> IP has an unknown or no Host: header. So what is the deal with a
> "_default_" vhost? In what case do I need such a vhost?
> 
> 
> ciao...
> -- 
> Lars Eilebrecht                     - Modesty: Being comfortable that others
> sfx@unix-ag.org                                will discover your greatness.
> http://www.si.unix-ag.org/~sfx/
> 


Mime
View raw message