Files don't update in vagrant when saved on host computer? Files don't update in vagrant when saved on host computer? nginx nginx

Files don't update in vagrant when saved on host computer?


It turned out the problem was Sublime Text's default "atomic save" feature that was creating this problem.

Adding the following to your Sublime Text preferences file will fix this:

"atomic_save": false


This is a known problem for Apache and nginx with Virtualbox -- so also vagrant (@see this vagrant issue). The sendfile kernel mode does not refresh on the shared disk folders.

To fix it use this on nginx configuration:

sendfile off


Have you tried the "rsync" option? It shouldn't be difficult to setup and should be more reliable.

config.vm.synced_folder ".", "/vagrant", type: "rsync"

This feature is available from Vagrant 1.5.

https://www.vagrantup.com/blog/feature-preview-vagrant-1-5-rsync.html