[warn] NameVirtualHost *:80 has no VirtualHosts

错误:[warn] NameVirtualHost *:80 has no VirtualHosts 

原因:定义了多个NameVirtualHost

解决:Ubuntu之前的版本定义在/etc/apache2/sites-available/default, 8.04后在/etc/apache2/ports.conf

故可以将/etc/apache2/ports.conf中的NameVirtualHost *:80注释掉

这个问题的本质是在没有定义域名是一个端口只能对应一个虚拟主机,将NameVirtualHost *:80改为其他端口也可以解决

如果有多个不同的域名的话,用同样的端口也可以

Last modified onWednesday, 29 May 2013 19:03

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169

Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
back to top