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

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

  •  
  •   ashin ·
    axiaoxin · Nov 4, 2018 · 2306 views
    This topic created in 2809 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
        1
    also24  
       Nov 4, 2018
    在这里看看?

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