httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Machtmes <smacht...@yahoo.com>
Subject RE: [users@httpd] why does my virutal site data get served when accessing the default site?
Date Fri, 01 Nov 2002 21:40:27 GMT
that's the concept I was missing. It works now. Many
Thanks!


--- Boyle Owen <Owen.Boyle@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
> -----Original Message-----
> From: Scott Machtmes [mailto:smachtmes@yahoo.com]
> Sent: Donnerstag, 31. Oktober 2002 17:55
> To: users@httpd.apache.org
> Subject: [users@httpd] why does my virutal site data
> get served when
> accessing the default site?
> 
> 
> I am using 2.0.43 on linux. I have the web server
> working. Then I added a virtual host but when I
> access
> either the default web site or the virutal site, I
> always get the virutal site data. The default site
> logs are going into the virutal logs also. If I
> disable the virtual site, the default site works
> normally again.
> 
> The default site is called:
> 
> ServerName ets-web02.englab.brocade.com
> 
> The virtual stuff looks like this:
> 
> NameVirtualHost *
> 
> <VirtualHost *>
>     ServerAdmin webmaster@mailman.englab.brocade.com
> DocumentRoot
> /var/www/virtual/mailman.englab.brocade.com/docs
> ServerName mailman.englab.brocade.com
> ScriptAlias /cgibin/
>
"/var/www/virtual/mailman.englab.brocade.com/cgi-bin/"
> ErrorLog
>
/var/www/virtual/mailman.englab.brocade.com/logs/error_log
> CustomLog
>
/var/www/virtual/mailman.englab.brocade.com/logs/access_log
> common
> </VirtualHost>
> 
> 
> =====
> --------------
> Scott Machtmes
> smachtmes@yahoo.com
> 
>
---------------------------------------------------------------------
> 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
> 
> This message is for the named person's use only. It
> may contain
> confidential, proprietary or legally privileged
> information. No
> confidentiality or privilege is waived or lost by
> any mistransmission.
> If you receive this message in error, please notify
> the sender urgently
> and then immediately delete the message and any
> copies of it from your
> system. Please also immediately destroy any
> hardcopies of the message.
> You must not, directly or indirectly, use, disclose,
> distribute, print,
> or copy any part of this message if you are not the
> intended recipient.
> The sender's company reserves the right to monitor
> all e-mail
> communications through their networks. Any views
> expressed in this
> message are those of the individual sender, except
> where the message
> states otherwise and the sender is authorised to
> state them to be the
> views of the sender's company. 
> 
>
---------------------------------------------------------------------
> 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
> 


=====
--------------
Scott Machtmes
smachtmes@yahoo.com

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