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 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等
  • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
  • ¥15 qt6.6.3 基于百度云的语音识别 不会改
  • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单