Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

In the process of trying to enable suexec module I starting getting these warnings (when I restarted apache). I get them when suexec is enabled & disabled:

 * Restarting web server apache2
[Wed Oct 05 01:29:40 2011] [warn] NameVirtualHost 12.345.67.89:443 has no VirtualHosts
... waiting [Wed Oct 05 01:29:41 2011] [warn] 12.345.67.89:443 has no VirtualHosts
...done.

I'm running Ubuntu 10.04, Apache2.2, PHP, MYSQL...

I'm running one site via https:// with a signed cert, ssl, etc, along with several other non-encrypted sites. This was previously working fine, but now (since I restarted the server after trying to enable suexec) I receive the above errors. If the *:443 virtual host is enabled, apache will not restart, and will not serve anything. If I disable the *:443 virtualhost, apache will not restart, and won't serve any of the domains I am hosting.

The only thing I messed with, except the suexec configuration (via command line), was the sites-enabled config file for the ssl-enabled domain, which looks like this:

<VirtualHost *:80>
     ServerAdmin name@gmail.com
     ServerName mysite.com
     ServerAlias www.mysite.com
     DocumentRoot /srv/www/mysite.com/public_html/
     ErrorLog /srv/www/mysite.com/logs/error.log
     CustomLog /srv/www/mysite.com/logs/access.log combined
</VirtualHost>

<VirtualHost *:443>
     SSLEngine On
     SSLCertificateFile /etc/apache2/ssl/mysite.com.crt
     ServerAdmin name@gmail.com
     ServerName mysite.com
     ServerAlias www.mysite.com
     DocumentRoot /srv/www/mysite.com/public_html/
     ErrorLog /srv/www/mysite.com/logs/error.log
     CustomLog /srv/www/mysite.com/logs/access.log combined
</VirtualHost>

Anyway, I'm not sure what's going on here but I'm reluctant to dig too deep into the other apache / ssl configs since I didn't change anything there and everything was working before.

I'm stumped.

EDIT

Some more info:

/etc/apache2/ports.conf:

Listen 12.345.67.89:80

<IfModule mod_ssl.c>
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

NameVirtualHost 12.345.67.89:443

/etc/apache2/sites-enabled/000-default makes no mention of port 443

... nor does /etc/apache2/sites-available/default

share|improve this question
    
grep -lr "NameVirtualHost" /etc/apache2? –  quanta Oct 5 '11 at 6:21
    
@quanta Edited ^^ –  starsinmypockets Oct 5 '11 at 6:45

1 Answer 1

up vote 5 down vote accepted

This warning comes up because you define a NameVirtualHost for 12.345.67.89:443 but there is no <VirtualHost 12.345.67.89:443>. So, change to NameVirtualHost *:443, it will go away.

share|improve this answer
    
This indeed solved the warning - thankyou... Apparently everything was still working ok under these settings. The fatal error was that I was missing an SSLCertificateKeyFile directive in my secure site's VirtualHost configuration. Thanks again! –  starsinmypockets Oct 5 '11 at 13:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.