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 MAC安装佳能LBP2900驱动的网盘提取码
  • ¥400 微信停车小程序谁懂的来
  • ¥15 ATAC测序到底用什么peak文件做Diffbind差异分析
  • ¥15 安装ubantu过程中第一个vfat 文件挂载失败
  • ¥20 GZ::CTF如何兼容一些靶机?
  • ¥15 etcd集群部署问题
  • ¥20 谁可以帮我一下问一下各位
  • ¥15 为何重叠加权后love图的SMD与svyCreateTableOne函数绘制基线表的不一致
  • ¥150 求 《小魔指》街机游戏机整合模拟软件
  • ¥20 你好,我想问下easyExcel下拉多选,或者复选框可以实现吗