VVV使用vagrant-hostsupdater插件自动配置主机。在更改Homestead.yaml文件后,Homestead有没有这样做的方法?
发布于 2016-10-21 19:23:57
在homestead.rb中添加此内容
if Vagrant.has_plugin?("vagrant-hostsupdater") && settings["hosts_file_additions"] == true
hosts = []
settings["sites"].each do |site|
hosts.push(site["map"])
end
config.hostsupdater.aliases = hosts
end在Homestead.yaml中添加此内容
sites:
- map: yourdevdomain.app
to: /home/www/laravel/public
hosts: 192.168.88.88
hosts_file_additions: true你的任务完成了!下面是详细的教程:https://aslamise.blogspot.com/2016/10/laravel-homestead-and-vagrant-hostsupdater-plugin.html
https://stackoverflow.com/questions/32225442
复制相似问题