Chrome localhost无效 [英] Chrome localhost does not work

查看:900
本文介绍了Chrome localhost无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经定义了一些虚拟服务器,直到最后几天工作正常。



现在他们不在Chrome上,但是在Firefox或safari中没有问题



我得到这个:



此网页不可用



ERR_ICANN_NAME_COLLISION
隐藏详细信息
本网站正在使用新的通用顶级域名(gTLD)。如果您已经使用loc.dev访问过去的内部站点,请与您的网络管理员联系。



我找到解决方案:



在chrome://标志中将内置异步DNS设置为禁用,但是我的chrome版本中没有这样的标志(43.0.2357.81)



您是否知道这个解决方案?



LE:如果我在htdocs文件上移动网站,我继续使用url



这是我所做的修复。



通过在Chrome浏览器中输入Google清除谷歌DNS缓存




  • chrome:// net-internals /#dns



屏幕截图 - >刷新Chrome DNS缓存




  • 你会看到一个按钮清除主机缓存。按下DNS缓存
    将被刷新。


  • 保持此DNS窗口打开。现在访问浏览器中的虚拟主机
    对我来说是http:/api.localhost。一旦你这样做,您将在DNS窗口中看到一个
    的新条目。对于我来说,这是 localhost。
    注意显示错误的本地主机末尾的


  • 最后一步是简单地添加关于您的本地文件的条目。




您的主机文件应使用条目进行更新,以将 localhost。解析为127.0.0.1:

  #不要忘记尾随。 ! 
127.0.0.1 localhost。

位于:




  • 为linux: / etc / hosts

  • 为Windows: C:\Windows \System32 \\ \etc\hosts



您的案例的另一个解决方案可能是在你的本地虚拟主机域



这与google的一些新的更改有关。 .dev来自谷歌的TLD(在互联网的角落里,人们关心DNS,Google的应用程序有一百多个新的顶级域名,包括.dev)。



尝试使用您拥有的域名。可能使用像localhost.dev。$ yourdomain这样的全称可以根据你的设置来帮助你。


I have defined some virtual servers that until the last days were working fine.

Now they don't on Chrome, but there are no problems in firefox or safary.

I get this:

This webpage is not available

ERR_ICANN_NAME_COLLISION Hide details This site is using a new generic top-level domain (gTLD). If you have used loc.dev to access an internal site in the past, contact your network administrator.

I found as a solution:

Set the "Built-in Asynchronous DNS" to "Disabled" in chrome://flags, but the is no such flag in my chrome version ( 43.0.2357.81 )

Do you know a solution for this?

LE : If i move the site on the htdocs file and i go on the url http://localhost, it works. It seems that it has a problem only with virtualhosts.

解决方案

Got the same issue after updating to the latest chrome version last night. I was getting a ERR_NAME_NOT_RESOLVED error only on google chrome for all of my virtual hosts. Here's how that looked.

Screen Shot-> DNS name not resolved error

Here's the fix I made.

Clear up the google DNS cache by typing this in the Chrome browser

  • chrome://net-internals/#dns

Screenshot -> Flushing Chrome DNS cache

  • You will see a button "Clear Host Cache". Press that DNS cache will be flushed.

  • Keep this DNS window open. Now access the virtual host in the browser for me it was http:/api.localhost. Once you do that you will see a new entry in the DNS window. for me it was "localhost." notice the period "." at the end of localhost that showed an error.

  • Last step is to simply add this entry as to your localhost file.

Your hosts file should be updated with an entry to resolve localhost. to 127.0.0.1:

# dont forget the trailing . !!!
127.0.0.1 localhost.  

in the hosts file located at:

  • for linux : /etc/hosts
  • for windows : C:\Windows\System32\drivers\etc\hosts

Another solution for your case might be to ditch the .dev at the end of your local virtual host domain

This has to do with some new changes by google. ".dev" comes under google's TLD (In the corner of the internet where people care about DNS, there is a bit of an uproar at Google's application for over a hundred new top-level domains, including .dev)

Try this Use a domain name you own. Possibly using the full name like "localhost.dev.$yourdomain" could help you here depending on your setup.

这篇关于Chrome localhost无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆