phansible icon indicating copy to clipboard operation
phansible copied to clipboard

Shared path on guest != Document Root

Open EmanueleMinotto opened this issue 10 years ago • 5 comments

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.

EmanueleMinotto avatar Oct 24 '15 10:10 EmanueleMinotto

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.

kanafghan avatar Oct 24 '15 12:10 kanafghan

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 avatar Oct 24 '15 12:10 EmanueleMinotto

@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?

debo avatar Feb 16 '16 23:02 debo

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 avatar Sep 02 '16 05:09 aoga88

@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.

debo avatar Sep 02 '16 11:09 debo