我正在设置一个流浪盒来创建一个django框,我需要在配置shell代码中更改apache2 vhost配置。 如何在shell命令中编辑文件?
答案 0 :(得分:0)
Most simple is if you can have a copy of the host file configuration that you want to apply to your VM. So on your host machine you have the file and during provisioning you will apply this file on the guest machine.
This can be done using the File Provisioner you will add the following in your Vagrantfile
config.vm.provision "file", source: "path/to/host_conf_file", destination: "/var/path/to/apache/conf/file"