I'm slightly confused, as the thread title says 'LocationMatch inside
VirtualHost', which doesn't seem related?

On Tue, 2009-04-14 at 06:19 -0400, Viaduct Productions wrote:
> On 14-Apr-09, at 4:57 AM, André Warnier wrote:
> 
> > So would you like to try again ?
> 
> 
> Sure.  I'll make it dead simple for you: Why does this happen?
> 
> sh-3.2# apachectl -S
> [Tue Apr 14 04:53:49 2009] [warn] NameVirtualHost *:80 has no  
> VirtualHosts
> VirtualHost configuration:
> wildcard NameVirtualHosts and _default_ servers:
> *:80                   is a NameVirtualHost
>           default server gam (/private/etc/apache2/users/rich.conf:31)
>           port 80 namevhost gam (/private/etc/apache2/users/rich.conf: 
> 31)
>           port 80 namevhost localtest (/private/etc/apache2/users/ 
> rich.conf:55)
>           port 80 namevhost vp (/private/etc/apache2/users/rich.conf:63)
>           port 80 namevhost if (/private/etc/apache2/users/rich.conf:75)
>           port 80 namevhost hq (/private/etc/apache2/users/rich.conf:87)
>           port 80 namevhost hco (/private/etc/apache2/users/rich.conf: 
> 95)
>           port 80 namevhost gam (/private/etc/apache2/users/rich.conf: 
> 31)
>           port 80 namevhost localtest (/private/etc/apache2/users/ 
> rich.conf:55)
>           port 80 namevhost vp (/private/etc/apache2/users/rich.conf:63)
>           port 80 namevhost if (/private/etc/apache2/users/rich.conf:75)
>           port 80 namevhost hq (/private/etc/apache2/users/rich.conf:87)
>           port 80 namevhost hco (/private/etc/apache2/users/rich.conf: 
> 95)
> Syntax OK
> 
> Observation (again, making it dead simple for you):
> 1.  no virtualhosts
  (incorrect assumption, that is not what apache said)
> 2.  13 virtualhosts
  (correct)
> 3.  Syntax OK
  (correct)
> 
> So 0 == 13.  Also, 0 == 13 is "OK".
  The syntax is correct, but the semantics are slightly incorrect, hence
the error message.
> 
> Conclusion:  Problems  Most developers, have limited patience with  
> misleading software.  From Wikipedia:

I'm inferring that the problem is:
You have vhosts, you get the error message 'NameVirtualHost *:80 has no
VirtualHosts', and you don't understand why? I'll step you through it..

1) Name based vhosts are 'named' by the socket they come in on. 

2) The names are specified by NameVirtualHost <name>. 

3) The name must specify an interface/socket to react to, eg '*' or
'*:80' or '127.0.0.1:80'.

4) A particular vhost uses a named socket to react to by specifying the
name in the '<VirtualHost name>' directive, eg '<VirtualHost *>' or
'<VirtualHost *:80>'.

5) Apache looks at all the NameVirtualHost directives, and then looks at
all the VirtualHost directives, comparing the names.

6) If there are any names specified with 'NameVirtualHost foo', that do
not have a corresponding '<VirtualHost foo>', then apache will warn
'NameVirtualHost foo has no VirtualHosts'.

Since you haven't provided your httpd.conf, I couldn't tell you any more
what is wrong, but for sure the PEBKAC. 

> 
> <snip troll>
> 
> And be nice.
> 
> Rich in Toronto
> ...now go get on your bike



---------------------------------------------------------------------
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-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to