Google chrome Chrome现在将localhost的IP地址与somesite.localhost相同
有一段时间,我在Windows7操作系统上运行了两个不同的服务器环境。IIS在127.0.0.1上运行,我有一个使用192.168.33.10的Vagrant VM。我的主机文件看起来像:Google chrome Chrome现在将localhost的IP地址与somesite.localhost相同,google-chrome,iis,localhost,vagrant,hosts,Google Chrome,Iis,Localhost,Vagrant,Hosts,有一段时间,我在Windows7操作系统上运行了两个不同的服务器环境。IIS在127.0.0.1上运行,我有一个使用192.168.33.10的Vagrant VM。我的主机文件看起来像: vagrantsite1.localhost 192.168.33.10 vagrantsite2.localhost 192.168.33.10 iissite1.localhost 127.0.0.1 iissite2.localhost 127.0.0.1 直到大约一周前,这个设置工作得非常好,但是
- vagrantsite1.localhost 192.168.33.10
- vagrantsite2.localhost 192.168.33.10
- iissite1.localhost 127.0.0.1
- iissite2.localhost 127.0.0.1
一种解决方法是将条目更改为不以localhost结尾,类似“vagrantsite1.local 192.168.33.10”的内容应该会起作用。ping vagrantsite1.localhost时IP显示了什么?如果显示127.0.0.1,则当我ping vagrantsite1.localhost时可能是配置错误,我得到192.168.33.10。当我看铬合金的时候chrome://net-internals/#dns 清除主机缓存并访问vagrantsite1.localhost后,我看到localhost 127.0.0.1的新条目。就好像Chrome对vagrantsite1.localhost=localhost感到困惑,事实并非如此。如前所述,这只发生在Chrome中,Firefox和IE似乎正在解析正确的IP。谢谢你,当像这样的新“功能”被引入并最终造成严重破坏时,这是令人沮丧的。我更喜欢使用.localhost扩展,但现在将切换到本地。刚刚有了这个确切的实现时刻!谢谢你证实我的怀疑。名为client.localhost的开发服务器已停止工作。显示了各种不同的错误,但都是因为它们被解析到开发人员自己的机器上(在Chrome中)。