laravel / homestead box是否配有默认网站设置?

时间:2015-09-08 03:26:09

标签: php laravel vagrant homestead

我想知道我的家园设置是否有问题

我正在关注官方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 ....

1 个答案:

答案 0 :(得分:0)

我不记得宅基地是否附带默认网站,但您的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

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

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