Chrome 不会解析 Vagrant/VirtualBox 主机?

Chrome won't resolve Vagrant/VirtualBox host?

由于 .dev 现在是 gTLD 并强制重定向到 Chrome 中的 https,我使用域 awesome.localhost 而不是以前的默认设置使用 PuPHPet 设置了一个新的开发环境awesome.dev

Chrome 根本没有解决它,returns 一条 ERR_EMPTY_RESPONSE 消息,控制台中没有错误或信息。

我可以成功 ping 域并且 IP 匹配。它在 Firefox 和 Internet Explorer 中也能正常工作。

正确使用 Chrome 中与服务器关联的 IP 地址 returns 将虚拟主机添加到主机文件的说明页面。

我该如何解决这个问题?可能是什么原因造成的?

Chrome 版本 63.0

我相信 Chrome 完全绕过 .localhost 域的 DNS,并始终在内部将其解析为 127.0.0.1

RFC 6761 保留 .test.localhost.example.invalid TLD。对于这些类型的内部主机名,我会使用 .test

根据 RFC:

The domain "localhost." and any names falling within ".localhost." are special in the following ways:

  1. Users are free to use localhost names as they would any other domain names. Users may assume that IPv4 and IPv6 address queries for localhost names will always resolve to the respective IP loopback address.
  1. Application software MAY recognize localhost names as special, or MAY pass them to name resolution APIs as they would for other domain names.
  1. Name resolution APIs and libraries SHOULD recognize localhost names as special and SHOULD always return the IP loopback address for address queries and negative responses for all other query types. Name resolution APIs SHOULD NOT send queries for localhost names to their configured caching DNS server(s).
  1. ...