You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Evje <se...@shawcable.com> on 2002/11/01 23:03:20 UTC

Re: [users@httpd] why does my virutal site data get served whenaccessing the default site?

Ditto that!!! It now works. Thanks for being so patient Boyle. Wish I
could buy you a beer. :-)

Selmer

Scott Machtmes wrote:
> 
> that's the concept I was missing. It works now. Many
> Thanks!
> 
> --- Boyle Owen <Ow...@swx.com> wrote:
> > Because you told it to.
> >
> >       NameVirtualHost *
> > means:
> >       "Check for name-based virtual hosts on all
> > interfaces"
> >
> > Therefore the server will consider every request as
> > a NBVH request. It
> > will therefore look in its one and only VH container
> > and try to match
> > the "Host" header with the ServerName argument. If
> > it fails, it will
> > default to the *first* VH container - which is still
> > the same one...
> >
> > The point is that once you decide to use VHs, you
> > should forget about
> > "default" sites which are external to VHs. In other
> > words, you should
> > put all site specific directives *inside* VH
> > containers. You can still
> > achieve the default effect by using the behaviour
> > described above to
> > your advantage, e.g.
> >
> > NameVirtualHost *
> >
> > <VirtualHost *>
> >       ServerName any_name_you_like
> >       DocumentRoot /path/to/default/site
> > </VirtualHost>
> >
> > <VirtualHost *>
> >       ServerName mailman.englab.brocade.com
> >       DocumentRoot /path/to/mailman/site
> > </VirtualHost>
> >
> > Now a request to "mailman.englab.brocade.com" will
> > match the 2nd VH and
> > get the mailman site. A request which does *not*
> > match mailman will
> > default to the first VH - even though it doesn't
> > match
> > "any_name_you_like".
> >
> > Rgds,
> >
> > Owen Boyle

---------------------------------------------------------------------
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