NameVirtualHost has no VirtualHosts

这个问题不大。如果是我自己手写Apache conf文件,我一般不会用到NameVirtualHost。

我发现这个问题出现在Godaddy Server上,预装的是Godaddy自带的Simple Control Panel。Simple Control Panel会把Virtual Host信息保存在simplepanel.conf。如果通过Simple Control Panel重启Apache,不会看到任何症状;但如果在ssh下运行/etc/init.d/httpd restart,就会有若干个Warning “NameVirtualHost xxx.xxx.xxx.xxx:80 has no VirtualHosts”。

Simple Control Panel为每个配置的域名都添加一个ip-based NameVirtualHost directive,其实是不必要的,过多相同的NameVirtualHost就导致了Warning,删掉就可以了。

Leave a comment

Your email address will not be published. Required fields are marked *