Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

NameVirtualHost has no VirtualHosts

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


luc.saffre at gmx

Apr 10, 2012, 12:12 AM

Post #1 of 7 (1491 views)
Permalink
NameVirtualHost has no VirtualHosts

Hi,

I keep getting a "NameVirtualHost *:80 has no VirtualHosts" warning with
the configuration below. Apache version 2.2.16. It is on server named
"jana", 192.168.1.103, accessible only from my LAN.

I read the following documentation sections:
- Name-based Virtual Host Support
- VirtualHost Examples
- An In-Depth Discussion of Virtual Host Matching

I couldn't see any relevant messages in the error.log
I searched Bugzilla for "NameVirtualHost has no VirtualHosts" and it
answered "Zarro Boogs found."

Please help me by giving your opinion about what might be wrong!

Luc

Content of /etc/apache2/sites-available/default
------------
NameVirtualHost *:80
ServerName jana
ServerAdmin webmaster [at] localhos
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/access.log combined

WSGIApplicationGroup %{GLOBAL}

<VirtualHost *:80>
ServerName dsbe.jana
DocumentRoot /usr/share/apache2/default-site

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

WSGIDaemonProcess dsbe processes=2 threads=15
WSGIProcessGroup dsbe

WSGIScriptAlias / /usr/local/django/dsbe_eupen/wsgi.py
Alias /media/ /usr/local/django/dsbe_eupen/media/
<Location /media/>
SetHandler none
</Location>

DavLockDB /tmp/DavLock

<Location /media/webdav/>
DAV On
# ForceType text/plain
AuthType Basic
AuthName "WebDAV dsbe_eupen [at] jan"
AuthUserFile /usr/local/django/dsbe_eupen/htpasswd/passwords
AuthGroupFile /usr/local/django/dsbe_eupen/htpasswd/groups
#<LimitExcept GET>
#Require group dav
#</LimitExcept>
</Location>

<Location />
AuthType Basic
AuthName "dsbe_eupen [at] jan"
AuthUserFile /usr/local/django/dsbe_eupen/htpasswd/passwords
AuthGroupFile /usr/local/django/dsbe_eupen/htpasswd/groups
Require group lino
# AllowOverride None
</Location>

</VirtualHost>

<VirtualHost *:80>
ServerName wsl.jana
DocumentRoot /usr/share/apache2/default-site

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>


WSGIDaemonProcess wsl processes=2 threads=15
WSGIProcessGroup wsl

WSGIScriptAlias / /usr/local/django/wsl/apache/django.wsgi
Alias /media/ /usr/local/django/wsl/media/
<Location /media/>
SetHandler none
</Location>

</VirtualHost>

<VirtualHost *:80>

ServerName aze.jana
DocumentRoot /usr/share/apache2/default-site

WSGIApplicationGroup %{GLOBAL}

WSGIDaemonProcess aze processes=2 threads=15
WSGIProcessGroup aze

WSGIScriptAlias / /usr/local/django/aze/wsgi.py

Alias /media/ /usr/local/django/aze/media/
<Location /media/>
SetHandler none
</Location>

<Directory /usr/local/django/aze>
Order deny,allow
Allow from all
</Directory>

<Location />
AuthType Basic
AuthName "aze [at] jan"
AuthUserFile /usr/local/django/aze/htpasswd/passwords
AuthGroupFile /usr/local/django/aze/htpasswd/groups
Require group lino
# AllowOverride None
</Location>

</VirtualHost>
------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


rainer.frey at inxmail

Apr 10, 2012, 12:26 AM

Post #2 of 7 (1431 views)
Permalink
Re: NameVirtualHost has no VirtualHosts [In reply to]

On 10.04.2012, at 09:12, Luc Saffre wrote:

> Hi,
>
> I keep getting a "NameVirtualHost *:80 has no VirtualHosts" warning with
> the configuration below. Apache version 2.2.16.
> Please help me by giving your opinion about what might be wrong!
> Content of /etc/apache2/sites-available/default

2 ideas:
* the default site is not enabled (see /etc/apache2/sites-enabled - there should be a 000-default symlink)
* your apache starts with a completely different config

You can verify with apachectl -S and apachectl -V

Rainer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


covener at gmail

Apr 10, 2012, 3:01 AM

Post #3 of 7 (1411 views)
Permalink
Re: NameVirtualHost has no VirtualHosts [In reply to]

You have another "NameVirtualHost *:80" in your configuration, try grep.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


luc.saffre at gmx

Apr 10, 2012, 4:08 AM

Post #4 of 7 (1475 views)
Permalink
Re: NameVirtualHost has no VirtualHosts [In reply to]

Thanks, Eric and Rainer, for your replies.

On 10.04.2012 10:26, Rainer Frey wrote:
> 2 ideas:
> * the default site is not enabled (see /etc/apache2/sites-enabled - there should be a 000-default symlink)
> * your apache starts with a completely different config

I forget to mention that I had tested that possibility by putting some
deliberate syntax error into the config file. This produced the expected
error messages. Also the following seems correct and simple:

# ls -l /etc/apache2/sites-enabled/
total 0
lrwxrwxrwx 1 root root 26 Jun 7 2011 000-default -> \
../sites-available/default

And to answer to Eric's suggestion, no, there's no accidental second
NameVirtualHost directive:

# grep NameVirtual /etc/apache2/sites-enabled/*
NameVirtualHost *:80

> You can verify with apachectl -S and apachectl -V

Good idea. But also here I cannot see anything anormal. Maybe somebody
else does:

# apachectl -S
[Tue Apr 10 10:50:43 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80 is a NameVirtualHost
default server dsbe.jana
(/etc/apache2/sites-enabled/000-default:15)
port 80 namevhost dsbe.jana
(/etc/apache2/sites-enabled/000-default:15)
port 80 namevhost wsl.jana
(/etc/apache2/sites-enabled/000-default:66)
port 80 namevhost aze.jana
(/etc/apache2/sites-enabled/000-default:87)
Syntax OK

# apachectl -V
Server version: Apache/2.2.16 (Debian)
Server built: Sep 25 2011 22:18:56
Server's Module Magic Number: 20051115:24
Server loaded: APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="mime.types"
-D SERVER_CONFIG_FILE="apache2.conf"
#

Best regards,
Luc
(still locked, and still hoping for your ideas)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


covener at gmail

Apr 10, 2012, 4:24 AM

Post #5 of 7 (1417 views)
Permalink
Re: NameVirtualHost has no VirtualHosts [In reply to]

> # grep NameVirtual /etc/apache2/sites-enabled/*
> NameVirtualHost *:80

try a more comprehensive search?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


aparnapuram at gmail

Apr 10, 2012, 4:24 AM

Post #6 of 7 (1445 views)
Permalink
Re: NameVirtualHost has no VirtualHosts [In reply to]

Hi,

Did u try rebuilding the apache config file using the following script?

/scripts/rebuildhttpdconf


On Tue, Apr 10, 2012 at 4:38 PM, Luc Saffre <luc.saffre [at] gmx> wrote:

> Thanks, Eric and Rainer, for your replies.
>
> On 10.04.2012 10:26, Rainer Frey wrote:
> > 2 ideas:
> > * the default site is not enabled (see /etc/apache2/sites-enabled -
> there should be a 000-default symlink)
> > * your apache starts with a completely different config
>
> I forget to mention that I had tested that possibility by putting some
> deliberate syntax error into the config file. This produced the expected
> error messages. Also the following seems correct and simple:
>
> # ls -l /etc/apache2/sites-enabled/
> total 0
> lrwxrwxrwx 1 root root 26 Jun 7 2011 000-default -> \
> ../sites-available/default
>
> And to answer to Eric's suggestion, no, there's no accidental second
> NameVirtualHost directive:
>
> # grep NameVirtual /etc/apache2/sites-enabled/*
> NameVirtualHost *:80
>
> > You can verify with apachectl -S and apachectl -V
>
> Good idea. But also here I cannot see anything anormal. Maybe somebody
> else does:
>
> # apachectl -S
> [Tue Apr 10 10:50:43 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
> VirtualHost configuration:
> wildcard NameVirtualHosts and _default_ servers:
> *:80 is a NameVirtualHost
> default server dsbe.jana
> (/etc/apache2/sites-enabled/000-default:15)
> port 80 namevhost dsbe.jana
> (/etc/apache2/sites-enabled/000-default:15)
> port 80 namevhost wsl.jana
> (/etc/apache2/sites-enabled/000-default:66)
> port 80 namevhost aze.jana
> (/etc/apache2/sites-enabled/000-default:87)
> Syntax OK
>
> # apachectl -V
> Server version: Apache/2.2.16 (Debian)
> Server built: Sep 25 2011 22:18:56
> Server's Module Magic Number: 20051115:24
> Server loaded: APR 1.4.2, APR-Util 1.3.9
> Compiled using: APR 1.4.2, APR-Util 1.3.9
> Architecture: 32-bit
> Server MPM: Prefork
> threaded: no
> forked: yes (variable process count)
> Server compiled with....
> -D APACHE_MPM_DIR="server/mpm/prefork"
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D DYNAMIC_MODULE_LIMIT=128
> -D HTTPD_ROOT="/etc/apache2"
> -D SUEXEC_BIN="/usr/lib/apache2/suexec"
> -D DEFAULT_PIDLOG="/var/run/apache2.pid"
> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
> -D DEFAULT_ERRORLOG="logs/error_log"
> -D AP_TYPES_CONFIG_FILE="mime.types"
> -D SERVER_CONFIG_FILE="apache2.conf"
> #
>
> Best regards,
> Luc
> (still locked, and still hoping for your ideas)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe [at] httpd
> For additional commands, e-mail: users-help [at] httpd
>
>


luc.saffre at gmx

Apr 10, 2012, 7:39 AM

Post #7 of 7 (1485 views)
Permalink
Re: NameVirtualHost has no VirtualHosts [In reply to]

Tilt, I got it! Thanks again, Eric, and Aparna.

To try your suggestions I dived more into the details of Apache config
specials on Debian
(http://www.control-escape.com/web/configuring-apache2-debian.html) and
finally found that there was indeed another "NameVirtualHost *:80" in
`/etc/apache2/ports.conf`.
So the solution was simply to remove my NameVirtualHost directive from
`default`.

Luc

On 10.04.2012 14:24, aparna Puram wrote:
> Hi,
>
> Did u try rebuilding the apache config file using the following script?
>
> /scripts/rebuildhttpdconf
>
>
> On Tue, Apr 10, 2012 at 4:38 PM, Luc Saffre <luc.saffre [at] gmx
> <mailto:luc.saffre [at] gmx>> wrote:
>
> Thanks, Eric and Rainer, for your replies.
>
> On 10.04.2012 10:26, Rainer Frey wrote:
> > 2 ideas:
> > * the default site is not enabled (see /etc/apache2/sites-enabled
> - there should be a 000-default symlink)
> > * your apache starts with a completely different config
>
> I forget to mention that I had tested that possibility by putting some
> deliberate syntax error into the config file. This produced the expected
> error messages. Also the following seems correct and simple:
>
> # ls -l /etc/apache2/sites-enabled/
> total 0
> lrwxrwxrwx 1 root root 26 Jun 7 2011 000-default -> \
> ../sites-available/default
>
> And to answer to Eric's suggestion, no, there's no accidental second
> NameVirtualHost directive:
>
> # grep NameVirtual /etc/apache2/sites-enabled/*
> NameVirtualHost *:80
>
> > You can verify with apachectl -S and apachectl -V
>
> Good idea. But also here I cannot see anything anormal. Maybe somebody
> else does:
>
> # apachectl -S
> [Tue Apr 10 10:50:43 2012] [warn] NameVirtualHost *:80 has no
> VirtualHosts
> VirtualHost configuration:
> wildcard NameVirtualHosts and _default_ servers:
> *:80 is a NameVirtualHost
> default server dsbe.jana
> (/etc/apache2/sites-enabled/000-default:15)
> port 80 namevhost dsbe.jana
> (/etc/apache2/sites-enabled/000-default:15)
> port 80 namevhost wsl.jana
> (/etc/apache2/sites-enabled/000-default:66)
> port 80 namevhost aze.jana
> (/etc/apache2/sites-enabled/000-default:87)
> Syntax OK
>
> # apachectl -V
> Server version: Apache/2.2.16 (Debian)
> Server built: Sep 25 2011 22:18:56
> Server's Module Magic Number: 20051115:24
> Server loaded: APR 1.4.2, APR-Util 1.3.9
> Compiled using: APR 1.4.2, APR-Util 1.3.9
> Architecture: 32-bit
> Server MPM: Prefork
> threaded: no
> forked: yes (variable process count)
> Server compiled with....
> -D APACHE_MPM_DIR="server/mpm/prefork"
> -D APR_HAS_SENDFILE
> -D APR_HAS_MMAP
> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
> -D APR_USE_SYSVSEM_SERIALIZE
> -D APR_USE_PTHREAD_SERIALIZE
> -D APR_HAS_OTHER_CHILD
> -D AP_HAVE_RELIABLE_PIPED_LOGS
> -D DYNAMIC_MODULE_LIMIT=128
> -D HTTPD_ROOT="/etc/apache2"
> -D SUEXEC_BIN="/usr/lib/apache2/suexec"
> -D DEFAULT_PIDLOG="/var/run/apache2.pid"
> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
> -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
> -D DEFAULT_ERRORLOG="logs/error_log"
> -D AP_TYPES_CONFIG_FILE="mime.types"
> -D SERVER_CONFIG_FILE="apache2.conf"
> #
>
> Best regards,
> Luc
> (still locked, and still hoping for your ideas)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe [at] httpd
> <mailto:users-unsubscribe [at] httpd>
> For additional commands, e-mail: users-help [at] httpd
> <mailto:users-help [at] httpd>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.