我有多个网站都设置相同,除了“bk”有其他东西在它的地方…
NameVirtualHost *:80 <VirtualHost bk:80> ServerName bk DocumentRoot /var/www/bk.com/ </VirtualHost>
和我重新启动Apache时得到这些错误:
[Mon Jan 17 10:28:56 2011] [error] VirtualHost bk:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results [Mon Jan 17 10:28:56 2011] [warn] NameVirtualHost bk:80 has no VirtualHosts
我不明白…其他2个网站我有虚拟主机configuration完全相同的方式不要抛出任何错误
更新
修正了一个错误消息 – 这里是我现在的位置..
<VirtualHost bk:80> ServerName bk DocumentRoot /var/www/bk.com/ </VirtualHost> [Mon Jan 17 10:28:56 2011] [error] VirtualHost bk:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
NameVirtualHost指令通常只能在服务器configuration中使用一次,通常它看起来像“NameVirtualHost *:80”,意思是“在所有可用的IP地址上提供虚拟主机”。 在大多数情况下,只要包含“主机:”字段,您不关心接受请求的IP地址。