Re: LocationMatch inside VirtualHost? [solved: bug]

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

 



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
2.  13 virtualhosts
3.  Syntax OK

etc..

It is maybe worth remembering that you get this software for free, as you are getting assistance for free on this users list. It is always an option to pay someone to offer you personal and tailored assistance and training.

Anyway, since you still have not told us on which platform you installed Apache, nor from where you got it, I'll try a few guesses.

This is the result of the same command on one of my servers (Linux Debian lenny with Apache httpd 2.2.9) :
evm2:~# /usr/sbin/apache2ctl -S
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   is a NameVirtualHost
default server evm2.mycompany.com (/etc/apache2/sites-enabled/.default:1) port 80 namevhost evm2.mycompany.com (/etc/apache2/sites-enabled/.default:1) port 80 namevhost maf.mycompany.com (/etc/apache2/sites-enabled/MAF:1) port 80 namevhost bsp.mycompany.net (/etc/apache2/sites-enabled/MIR:1) port 80 namevhost qa.mycompany.net (/etc/apache2/sites-enabled/NYC:1)
Syntax OK
evm2:~#

As you can see :
1) I do not get the same warning.
2) the layout of the configuration files is similar, but different from yours.

Here is maybe another thing you should understand (or learn) : the "standard" Apache software, created and maintained entirely by volunteers for your usage and pleasure, and for which the on-line documentation is written, is the one that you find on the official Apache website httpd.apache.org. That one does not have its configuration split up over different files and directories.

Apart from that standard version of Apache httpd, and quite a different thing, there exist multiple re-packaged versions of Apache, created by different and often also volunteer people, and adapted to a variety of different platforms and software distribution methods. The persons who decide how these configuration files are split and laid out for each of these re-packaged versions are the respective packagers of these versions, not the original Apache developers. These packagers generally do a fine job, and provide additional commands that may simplify, on one particular platform, the installation of Apache and the configuration of virtual hosts. And, they also generally provide their own separate documentation as to how they have done that, and how to use /their/ style of Apache configuration. That documentation, and help therefor, you may find on the respective support lists for these platforms, not on the main Apache support list.

But people here who contribute their time freely to try and help Apache beginners, do not know all these versions, so they cannot guess where your configuration files may be, nor what they contain, unless you tell them explicitly. So basically for instance, nobody but you knows what is in your file /private/etc/apache2/users/rich.conf, nor in your httpd.conf, nor any other configuration file that the Apache packager for your particular paltform may have chosen to "include" in the configuration. (Just as you do not know what is my file /etc/apache2/sites-enabled/MAF, nor from where it is being included; and just as the people who write the standard Apache documentation don't know that.)

My first guess is that since there are millions of Apache sites out there, and thousands of messages on this list, and not many of them reporting the same warning, this is most probably not a bug, but something wrong in your configuration files.
At this stage, does that sound like an unreasonable guess to you ?

My other guess at this stage is that, somewhere in one of your non-standard configuration files, you have a duplicate "NameVirtualHost *:80", and that this is why Apache is printing a warning.

I may be wrong of course, in which case providing a complete overview of your configuration files may help me or others spot the reason.



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