使用 Homestead 安装好 Laravel 后,访问不了

当前环境是通过 Homestead 搭建的#

  • Homestead up 正常
  • Homestead ssh 正常
  • host 已经配置

问题:无法访问项目(网关不通)#

file


刚开始学习 Laravel,麻烦各位帮忙分析下会是什么原因?该怎么解决。#

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L01 基础入门》
我们将带你从零开发一个项目并部署到线上,本课程教授 Web 开发中专业、实用的技能,如 Git 工作流、Laravel Mix 前端工作流等。
讨论数量: 8
冷无缺

问题已经解决,是 nginx 的配置问题。
具体解决方式可以参考 http://blog.leanote.com/post/wuliang/54c6d...
希望给遇到同样问题的朋友一个参考

8年前 评论

@冷无缺 你是怎么安装的,有没有参考文章

8年前 评论
冷无缺

@ChenPHPER
可以参考下面的两篇文章

8年前 评论
冷无缺

@ChenPHPER
应该是你的共享目录设置的有问题,仔细检查下。或者试试在虚拟机中自己新建一个 Code 文件夹试试

8年前 评论

@冷无缺
chenyanhuadeMacBook-Pro:Homestead chenyanhua$ vagrant up
/Users/chenyanhua/Homestead/scripts/homestead.rb:108:in `read': No such file or directory @ rb_sysopen - /Users/chenyanhua/.ssh/id_rsa (Errno::ENOENT)
出现了这个错误

8年前 评论

@冷无缺 @Summer 我已经导入这个 box 了, 你可以看看
chenyanhuadeMacBook-Pro:~ chenyanhua$ vagrant box add laravel/homestead //Users/chenyanhua/sites/virtualbox.box
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'laravel/homestead' (v0) for provider:
box: Unpacking necessary files from: file:////Users/chenyanhua/sites/virtualbox.box
==> box: Successfully added box 'laravel/homestead' (v0) for 'virtualbox'!
但是后面又重新下载
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'laravel/homestead' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0.4.0
==> default: Loading metadata for box 'laravel/homestead'
default: URL: https://atlas.hashicorp.com/laravel/homest...
==> default: Adding box 'laravel/homestead' (v0.5.0) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/laravel/boxes/...
default: Progress: 0% (Rate: 112k/s, Estimated time remaining: 5:25:51)^C==> default: Waiting for cleanup before exiting...
==> default: Box download was interrupted. Exiting.
这回是啥问题呢?

8年前 评论

后面这个是附加的
chenyanhuadeMacBook-Pro:Homestead chenyanhua$ vagrant box list
laravel/homestead (virtualbox, 0)
chenyanhuadeMacBook-Pro:Homestead chenyanhua$ vagrant global-status
id name provider state directory

There are no active Vagrant environments on this computer! Or,
you haven't destroyed and recreated Vagrant environments that were
started with an older version of Vagrant.
chenyanhuadeMacBook-Pro:Homestead chenyanhua$

8年前 评论