Laravel Homestead 2.0添加新站点 [英] Laravel Homestead 2.0 Adding New Sites

查看:71
本文介绍了Laravel Homestead 2.0添加新站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Homestead 2很棒,但是如果不经过以下过程,我似乎无法使新站点正常工作.

Homestead 2 is awesome, but I can't seem to get new sites to work without going through the following process.

  1. 我执行homestead edit设置新的站点路径和域等
  2. 我编辑hosts来设置域
  3. 我先执行homestead halt然后homestead up重新启动
  1. I do homestead edit to setup the new site paths and domains etc
  2. I edit hosts to set up the domain
  3. I do homestead halt then homestead up to restart

这是我认为事情应该起作用的时候,但事实并非如此.我必须执行

This is when I think things should be working... but they don't. I have to run the additional step of

  1. 运行vagrant global-status获取ID并运行vagrant provision <id>.
  1. Running vagrant global-status getting the id and running vagrant provision <id>.

一切正常,但再次运行供应将清除所有数据库!如何添加新站点而无需再次进行设置?

Everything works except running provision again wipes out all the databases! How do I add new sites without having to provision again?

推荐答案

而不是第3步,请在您的宅基地目录(~/.composer/vendor/laravel/homestead/)中使用vagrant provision.

Instead of step 3 use vagrant provision in your homestead directory (~/.composer/vendor/laravel/homestead/).

据我所知,泰勒已经在计划一个"provision"标志,直到您可以随意使用无所事事的命令为止.

As I know Taylor is already planning a "provision" flag, until that you can feel free to use vagrant commands.

这篇关于Laravel Homestead 2.0添加新站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆