Apache 2.2和启用站点的虚拟主机将被忽略

我从apache 2.0升级到apache 2.2,现在我所有的虚拟主机都被忽略了。 我正在运行一个debian服务器,我完全升级到新的apache2configuration文件。

在网站启用我有我所有的网站的链接可用,这工作之前完全正常!

当我启动服务器时,我得到:

Reloading web server config: apache2[Sat Oct 17 16:34:22 2009] [warn] NameVirtualHost *:80 has no VirtualHosts 

其中一个网站启用的文件:

 <VirtualHost *:80> ServerName www.domain.com ServerAdmin [email protected] DocumentRoot /document/root ErrorLog /document/root/error_log CustomLog /document/root/access_log combined </VirtualHost> 

有任何想法吗?? 提前致谢。

好的,我发现这个问题:

我的一些网站启用/ *文件只有:

 <VirtualHost *> 

没有端口号…这导致所有其他网站停止工作。

你应该添加了

 NameVirtualHost *:80 

虚拟主机上方的声明 – 这将允许您的所有configuration按预期工作。

该文档相当清楚这个http://httpd.apache.org/docs/2.0/vhosts/examples.html