NameVirtualHost 12.345.67.89:443启用和禁用suexec模块后没有VirtualHosts

在尝试启用suexec模块的过程中,我开始得到这些警告(当我重新启动apache)。 suexec启用和禁用时,我得到他们:

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

我正在运行Ubuntu 10.04,Apache2.2,PHP,MYSQL …

我正在运行一个站点通过https://与签名的证书,ssl等,以及其他几个未encryption的网站。 这以前工作正常,但现在(因为我尝试启用suexec后重新启动服务器)我收到上述错误。 如果启用*:443虚拟主机,则apache将不会重新启动,并且不会提供任何服务。 如果我禁用*:443虚拟主机,Apache将不会重新启动,并将不会服务我所托pipe的任何域。

除了suexecconfiguration(通过命令行)之外,唯一让我迷惑的是启用了ssl的域的启用站点的configuration文件,如下所示:

 <VirtualHost *:80> ServerAdmin [email protected] 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 [email protected] 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> 

无论如何,我不知道这里发生了什么事情,但是我不愿意深入其他apache / sslconfiguration,因为我没有改变任何东西,一切都在以前工作。

我很难过

编辑

一些更多信息:

/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没有提及端口443

…也不是/etc/apache2/sites-available/default

由于您为12.345.67.89:443定义了NameVirtualHost ,但是没有<VirtualHost 12.345.67.89:443> ,所以出现此警告 。 所以,改为NameVirtualHost *:443 ,它会消失。