Laravel Homestead 2.0添加新站点 [英] Laravel Homestead 2.0 Adding New Sites
问题描述
Homestead 2很棒,但是如果不经过以下过程,我似乎无法使新站点正常工作.
Homestead 2 is awesome, but I can't seem to get new sites to work without going through the following process.
- 我执行
homestead edit
设置新的站点路径和域等 - 我编辑
hosts
来设置域 - 我先执行
homestead halt
然后homestead up
重新启动
- I do
homestead edit
to setup the new site paths and domains etc - I edit
hosts
to set up the domain - I do
homestead halt
thenhomestead up
to restart
这是我认为事情应该起作用的时候,但事实并非如此.我必须执行
This is when I think things should be working... but they don't. I have to run the additional step of
- 运行
vagrant global-status
获取ID并运行vagrant provision <id>
.
- Running
vagrant global-status
getting the id and runningvagrant 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屋!