Apache虚拟主机文档说:
You can alternatively specify an explicit IP address in place of the * in <VirtualHost *:80> directives. For example, you might want to do this in order to run some name-based virtual hosts on one IP address, and either IP-based, or another set of name-based virtual hosts on another address.
这些虚拟主机块在明显有1个IP地址的服务器上执行。 为什么有必要在这些VirtualHost指令中提及不同的IP地址?
谢谢
这些虚拟主机块在明显有1个IP地址的服务器上执行。
服务器显然没有一个IP地址。
机器(任何机器,不仅是服务器硬件)可能有多个物理网卡,因此有多个IP地址。 操作系统也可以使用多个虚拟networking接口,因此具有多个IP地址。 使用特定IP地址的能力不仅不是奇怪的,而且非常可取。