Apache2 警告 NameVirtualHost 指令

Apache2 warning about NameVirtualHost directive

提问人:DanielAttard 提问时间:11/9/2012 更新时间:9/26/2014 访问量:37031

问:

有人可以帮我理解为什么我在重新启动 apache2 Web 服务器时收到以下错误:

[Fri Nov 09 09:46:43 2012] [warn] VirtualHost 172.30.30.12:443 overlaps with VirtualHost 172.30.30.12:443, the first has precedence, perhaps you need a NameVirtualHost directive
[Fri Nov 09 09:46:43 2012] [warn] VirtualHost 172.30.30.12:443 overlaps with VirtualHost 172.30.30.12:443, the first has precedence, perhaps you need a NameVirtualHost directive

错误总是出现两次。什么是 NameVirtualHost 指令?

谢谢。

apache2 ubuntu-10.04

评论

0赞 Pekka 11/9/2012
你定义了两个 s 吗?VirtualHost
0赞 DanielAttard 11/9/2012
我该如何检查?我应该寻找什么?
0赞 Pekka 11/9/2012
如果这是问题所在,就必须有人把 s 放在那里。您是否使用Web服务器,您是如何配置的?你应该在某个时候遇到过VirtualHostVirtualHost

答:

28赞 Perleone 11/9/2012 #1

请看这个例子

您可能需要将此行添加到 Apache HTTP 服务器配置中:

NameVirtualHost 172.30.30.12:443

评论

1赞 Harikrishnan 3/9/2016
您可以添加以启用所有 IP。NameVirtualHost *:443