Re: LocationMatch inside VirtualHost? [solved: bug]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 14-Apr-09, at 7:00 AM, Tom Evans wrote:

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

When I inserted the LocationMatch inside the VirtualHost directive, I was getting errors as reported.


Observation (again, making it dead simple for you):
1.  no virtualhosts
 (incorrect assumption, that is not what apache said)

Wow. And this is why I rarely post any information, because then it becomes a debate. So I will repost:

[Tue Apr 14 06:05:15 2009] [warn] NameVirtualHost *:80 has no VirtualHosts


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

Wonderful.  I'll assume this isn't in the docs.

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

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

OK, so this is where the docs do not indicate any of this.

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

See, when I put in my internal IP, more errors came up with respect to apachectl configtest.

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.

Actually, no. No modifications to httpd.conf, as I instructed earlier on in the thread. And the feedback suggests something different, as stated.

I don't know what it is about open source people. Documentation and service applications like configtest should provide a complete set of information so that people don't go astray in their thinking. So no, it isn't PEBKAC, or whatever the cute little acronym is. Things like these are used so often that you assign it to people that have no clue, as it happens so often, but under no circumstance does it ever indicate that perhaps the whole package is short of making sense to as many people. Take the frequency in which stuff like this crops up, to suggest that more can be done to explain the application and how it works. It's actually quite a simple item, and it would alleviate single postings like this to rectify confusion amongst users that get their information from remedial documentation and feedback from console commands.

In any case, thank you for the notes. It's the explanation like this which I think should be up front. I think it's a shame that this will get somewhat buried.

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-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux