douzhuijing4911 2018-06-07 21:58
浏览 157
已采纳

Laravel Valet安装后无法解析网站

Having a terribly frustrating time not having valet working on a fresh install. Going to any *.test site in my browser just hangs and eventually gets the error message This site can’t be reached, "ping app.test" hangs as well, and eventually errors with "ping: cannot resolve app.test: Unknown host". However pinging a different domain (such as ping.xyz errors immediately, as opposed to after ~20 seconds like with *.test).

On Os Sierra, my composer.json looks like the following

{
    "require": {
        "laravel/installer": "^1.5",
        "laravel/valet": "dev-master"
    }
}

Since I've seen that dev-master resolved this for some people. All my processes seem to be running:

Services running

However some clues are that http://localhost/ in my browser returns a page 404 - not found, and running sudo nginx returns a bunch of already in user errors:

❯ pwd                                                                                                                                                                 
/Users/schorr/.valet

schorr@Andrew-Schorr ~/.valet 
❯ sudo Nginx                                                                                                                                                          
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (48: Address already in use)

and valet fetch-share-url returns

❯ valet fetch-share-url                                                                                                                                                [17:04:53]
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
Failed to connect to 127.0.0.1 port 4040: Connection refused
...

Any help is greatly appreciated. thanks!

  • 写回答

2条回答 默认 最新

  • doumo6356 2018-06-22 17:25
    关注

    Finally figured this out, for anyone else in my very specific situation:

    I had changed my user name on the same machine, and for whatever reason installing dnsmasq wasn't overwriting the old /Users/user/.valet/dnsmasq.conf file. So at the very bottom I had:

    conf-file=/Users/OLD_USER_NAME/.valet/dnsmasq.conf
    
    conf-file=/Users/NEW_USER_NAME/.valet/dnsmasq.conf
    

    So all I had to do was comment out the OLD_USER_NAME line and was good to go :|

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog