重新启动apache2服务器时,我收到警告。
$ sudo service apache2 restart
* Restarting web server apache2
[Tue Sep 02 10:38:54 2014] [warn] NameVirtualHost *:80 has no VirtualHosts
[Tue Sep 02 10:38:54 2014] [warn] NameVirtualHost *:80 has no VirtualHosts
如何解决此警告?
答案 0 :(得分:0)
这里的问题是您的服务器配置错误。您希望确保Listen
,NameVirtualHost
和VirtualHost
的值都匹配。在你的情况下,我期待:
Listen *:80
NameVirtualHost *:80
<VirtualHost *:80>
ServerName ...
DocumentRoot ...
...
</VirtualHost>