当启动apache的时候,如果事件管理器出现“Apache NameVirtualHost *:80 has no VirtualHosts”错误时,大部分是因为修改了apache的httpd.conf配置文件,将extra/vhosts.conf文件引入到httpd.conf中了。
# Virtual hosts Include conf/extra/httpd-vhosts.conf
httpd-vhosts.conf文件中有一句配置语句为
NameVirtualHost *:80
<VirtualHost *:80> ServerAdmin webmaster@jb51.net DocumentRoot "D:/WAPM/www" ServerName www.niaoge.com ServerAlias www.niaoge.com ErrorLog "logs/www.niaoge.com-error.log" CustomLog "logs/www.niaoge.com-access.log" common </VirtualHost>