/ homestead

homestead

设置代码位置

folders:
    - map: ~/code
      to: /home/vagrant/code

站点配置

sites:
    - map: homestead.test
      to: /home/vagrant/Code/Laravel/public
    - map: blog.app
      to: /home/vagrant/Code/blog.laravel/public
    - map: forum.app
      to: /home/vagrant/Code/forum.laravel/public

数据库配置

databases:
    - homestead
    - blog
    - forum

vagrant 命令

命令行 说明
vagrant init 初始化 vagrant
vagrant up 启动 vagrant
vagrant halt 关闭 vagrant
vagrant ssh 通过 SSH 登录 vagrant(需要先启动 vagrant)
vagrant provision 重新应用更改 vagrant 配置
vagrant destroy 删除 vagrant

当增加站点、数据库时,需要在修改 Homestead.yml 后执行 vagrant provision 来让配置生效。