V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ashin
V2EX  ›  程序员

hosts 把 localhost 名称指向其他机器在 chrome 里面访问不了?

  •  
  •   ashin ·
    axiaoxin · 2018-11-04 22:16:43 +08:00 · 1624 次点击
    这是一个创建于 2000 天前的主题,其中的信息可能已经有所发展或是发生改变。

    配了一个 host 类似

    10.10.10.10 localhost
    

    然后在浏览器访问http://localhost:8080 在 chrome 里面访问不了 在 IE 里面可以

    终端 ping localhost 也解析的是 10.10.10.10

    这个是需要设置什么吗?

    5 条回复    2018-11-05 13:36:16 +08:00
    also24
        1
    also24  
       2018-11-04 22:19:38 +08:00
    在这里看看?

    chrome://net-internals/#dns
    OscarUsingChen
        2
    OscarUsingChen  
       2018-11-04 22:36:08 +08:00 via iPhone
    Chrome 对 localhost 的解析不听 hosts 文件的指挥
    Gempty
        3
    Gempty  
       2018-11-05 09:46:03 +08:00
    chrome://net-internals/ 了解一下??
    ashin
        4
    ashin  
    OP
       2018-11-05 13:32:05 +08:00
    @also24 @Gempty 都试过 不行
    Gempty
        5
    Gempty  
       2018-11-05 13:36:16 +08:00
    @ashin 清下浏览器缓存吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2985 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 13:21 · PVG 21:21 · LAX 06:21 · JFK 09:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.