【问题标题】:Does laravel/homestead box comes with default website setup?laravel/homestead 盒子是否带有默认网站设置?
【发布时间】:2015-09-08 11:38:37
【问题描述】:

我想弄清楚我的宅基地设置是否有问题

我关注的是官方direction。在教程的最后,教程说访问http://homestead.app 是可能的。但是,当我在 chrome 中运行该地址时,我会收到 No input file specified. 消息

我不确定这是否是默认页面,所以我检查了我的目录使用

homestead ssh

发现了

- map: /Users/Projects
  to: /home/vagrant/Projects

两个目录里面都没有任何文件,我不确定这是否是默认行为,但根据这个tutorial应该有一个文件夹中的文件列表

app artisan bootsrap composer.json composer.lock ....

【问题讨论】:

  • 我认为发表评论解释反对票是有建设性的,这将帮助我改善未来和现在的问题。

标签: php laravel vagrant homestead


【解决方案1】:

我不记得宅基地是否带有默认网站,但是您的homestead.yaml(您可以使用homestead edit 打开它)文件应该是这样的:

---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:                        //This is where vagrant will look for your projects
    - map: ~/Code               //This is your host folder
      to: /home/vagrant/Code    //This is your homestead folder

sites:                          //These are the urls that nginx will serve
    - map: homestead.app
      to: /home/vagrant/Code/homestead/public
    - map: site2.app
      to: /home/vagrant/Code/site2/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

通常,homestead 带有一个Code 文件夹,您可以在其中找到 laravel 项目(如果默认有的话)。

另外,请记住将 url 添加到您的主机文件中。

【讨论】:

    猜你喜欢
    • 2015-06-13
    • 2014-07-10
    • 2018-07-13
    • 1970-01-01
    • 2015-08-30
    • 1970-01-01
    • 2014-10-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多