是否laravel/homestead盒子自带默认的网站设置


Does laravel/homestead box comes with default website setup?

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

我遵循官方的指示。在指导的最后,教程说访问http://homestead.app是可能的。然而,当我在浏览器中运行地址时,我得到No input file specified.消息

我不确定这是否是默认页面,所以我使用

检查了我的目录
homestead ssh

发现

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

两个目录里面没有任何文件,我不确定这是否是默认行为,但根据本教程,文件夹

应该有一个文件列表
app artisan bootsrap composer.json composer.lock ....

我不记得是否homestead自带默认网站,但您的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。