虚拟主机问题

虚拟主机问题

配置了两个虚拟主机,DNS能正常正向和反向解析
虚拟主机配置文件如下
debian:/etc/apache2/conf.d# cat mailman.conf
NameVirtualHost lists.gforge.lynch.org
<VirtualHost lists.gforge.lynch.org>
   ServerName lists.gforge.lynch.org
   ServerAdmin webmaster@lists.gforge.lynch.org

   DocumentRoot "/var/www/mailman"

   ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
   Alias /pipermail/ /var/lib/mailman/archives/public/
   Alias /images/ /usr/share/images/

   DirectoryIndex index.php
</VirtualHost>


debian:/etc/apache2/conf.d# cat projects.conf
NameVirtualHost projects.gforge.lynch.org
<VirtualHost projects.gforge.lynch.org>
   ServerName projects.gforge.lynch.org
   ServerAlias *.projects.gforge.lynch.org
   ServerAdmin webmaster@gforge.lynch.org
   UseCanonicalName Off

   DocumentRoot "/var/www/groups"
   VirtualDocumentRoot "/var/www/groups/%1/htdocs"

   <Directory /var/www/homedirs/groups>
      Options Indexes
      php_flag engine off
      AllowOverride None
      Order allow,deny
      Allow from all
   </Directory>
   DirectoryIndex index.php
</VirtualHost>

但重起Apache时出现以下问题
debian:/etc/apache2/conf.d# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...[Wed Nov 21 18:49:26 2007] [warn] NameVirtualHost projects.gforge.lynch.org:0 has no VirtualHosts
waiting [Wed Nov 21 18:49:28 2007] [warn] NameVirtualHost projects.gforge.lynch.org:0 has no VirtualHosts
.

请问该怎么配置呢?
NameVirtualHost 只应该出现一次 位于第一个对<VirtualHost></VirtualHost>之前
<VirtualHost>最好写成<VirtualHost *:端口>
换用以下形式也不行,报错相同

NameVirtualHost *:80
<VirtualHost *:80>
   ServerName lists.gforge.lynch.org
   ServerAdmin webmaster@lists.gforge.lynch.org

   DocumentRoot "/var/www/mailman"

   ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
   Alias /pipermail/ /var/lib/mailman/archives/public/
   Alias /images/ /usr/share/images/

   DirectoryIndex index.php
</VirtualHost>

debian:/etc/apache2/conf.d# cat projects.conf
NameVirtualHost *:80
<VirtualHost *:80>
   ServerName projects.gforge.lynch.org
   ServerAlias *.projects.gforge.lynch.org
   ServerAdmin webmaster@gforge.lynch.org
   UseCanonicalName Off

   DocumentRoot "/var/www/groups"
   VirtualDocumentRoot "/var/www/groups/%1/htdocs"

   <Directory /var/www/homedirs/groups>
      Options Indexes
      php_flag engine off
      AllowOverride None
      Order allow,deny
      Allow from all
   </Directory>
   DirectoryIndex index.php
</VirtualHost>
把*换成网卡的IP地址试试
NameVirtualHost *:80
<VirtualHost *:80>
.
.
.
.
.
</VirtualHost>

<VirtualHost *:80>
.
.
.
.

</VirtualHost>
NameVirtualHost IP
<VirtualHost IP>
.
.
.
.
.
</VirtualHost>

<VirtualHost IP>
.
.
.
.

</VirtualHost>