• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ashin
V2EX  ›  程序员

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

  •  
  •   ashin ·
    axiaoxin · Nov 4, 2018 · 2510 views
    This topic created in 2922 days ago, the information mentioned may be changed or developed.

    配了一个 host 类似

    10.10.10.10 localhost
    

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

    终端 ping localhost 也解析的是 10.10.10.10

    这个是需要设置什么吗?

    5 replies  •  2018-11-05 13:36:16 +08:00
    also24
    also24
    Nov 4, 2018
    1
    在这里看看?

    chrome://net-internals/#dns
    OscarUsingChen
    OscarUsingChen
    Nov 4, 2018 via iPhone
    2
    Chrome 对 localhost 的解析不听 hosts 文件的指挥
    NB40B938mff85mtq
    NB40B938mff85mtq
    Nov 5, 2018
    3
    chrome://net-internals/ 了解一下??
    ashin
    ashin
    OP
    Nov 5, 2018
    4
    @also24 @Gempty 都试过 不行
    NB40B938mff85mtq
    NB40B938mff85mtq
    Nov 5, 2018
    5
    @ashin 清下浏览器缓存吗?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1375 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 22:51 · PVG 06:51 · LAX 14:51 · JFK 17:51
    ♥ Do have faith in what you're doing.