📜  为什么 127.0.0.1 工作时 localhost 不工作 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:22.151000             🧑  作者: Mango

代码示例1
127.0.0.1       localhost
127.0.1.1       vagrant.vm      vagrant

# The following lines are desirable for IPv6 capable hosts
#::1     localhost ip6-localhost ip6-loopback
::1     ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.2.1 w1 w1