【问题标题】:Local (dev) hosts domains ignored, but 'blocking' domains works...?本地(开发)主机域被忽略,但“阻止”域有效......?
【发布时间】:2018-01-22 11:46:34
【问题描述】:

我正在使用 Laravel 项目运行虚拟机。

在浏览器中输入 192.168.10.10 会正确重定向到 Laravel 主页。 键入 testing.test 是谷歌搜索“testing.test”。尝试过 IE/Edge、Opera、Chrome。

我的 Homestead.yaml 配置是:

sites:
    - map: testing.test
      to: /home/vagrant/Code/Laravel/public

我的主机文件是:

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost
192.168.10.10 testing.test

有趣的是 - 如果我添加

127.0.0.1       www.stackoverflow.com

Stackoverflow 将被“阻止”。

同时来自指挥官的 ping testing.test 也从 192.168.10.10 得到了肯定的响应。

尝试刷新 DNS,关闭 IPv6。请帮忙:)

【问题讨论】:

    标签: laravel ip hosts


    【解决方案1】:

    在 hosts 文件的 testing.test 前添加 http:// 有帮助。还从 chrome 和 opera 中清除了 dns。 所以主机文件现在看起来:

    192.168.10.10 http://testing.test www.testing.test testing.test
    

    【讨论】:

      猜你喜欢
      • 2020-03-16
      • 2019-11-17
      • 2019-03-05
      • 2018-09-17
      • 2023-04-10
      • 2022-01-18
      • 2017-02-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多