Shared path on guest != Document Root
As reported in the title, the shared path is always /vagrant even if I set /var/www, is it wanted or a bug?
I know these should be different, what I mean is that it's always /vagrant.
Where do you set the /var/www?
You can do so, in Vagrantfile as so:
config.vm.synced_folder "c:/dev/vagrant/webroot", "/var/www", type: "nfs"
As default the shared folder on the guest machine is hardcoded to /vagrant. It would have been nice though to have this also as input.
As default the shared folder on the guest machine is hardcoded to /vagrant. It would have been nice though to have this also as input.
That's what I meant, good to know, I hope to send a PR asap. :)
@EmanueleMinotto I'm not sure I follow entirely but so that you know, regardless configuration, Vagrant always create a /vagrant shared folder in the guest no matter what. However, my understanding, is that even if you specify a different shared folder (in Phansible), the specified folder shate is not created at all. Is that correct?
Same issue for me @debo, I set up Apache root as /opt/test/public but nfs default is /vagrant, would be nice to be able to setup your synced path or even better, a group of paths if you want to sync a bunch of folders
@aoga88 you can setup a custom path for the shared folder and you can match that one to the docroot. I appreciate is not ideal though and be able to specify a list would be better. I'll have a look into it.