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

当前环境是通过Homestead搭建的

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

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

file


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

《L05 电商实战》
从零开发一个电商项目,功能包括电商后台、商品 & SKU 管理、购物车、订单管理、支付宝支付、微信支付、订单退款流程、优惠券等
《L03 构架 API 服务器》
你将学到如 RESTFul 设计风格、PostMan 的使用、OAuth 流程,JWT 概念及使用 和 API 开发相关的进阶知识。
讨论数量: 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年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!