Caleb Lewis
Caleb Lewis

Reputation: 543

Vagrant messes up code?

With the following Git repo, when I execute vagrant up, the machine boots up correctly and everything show up exactly how it should. When I start editing code, however, Vagrant totally mangles the code.

When the page is pulled up, sometimes the last 10 lines of the document is missing and sometimes there are random non-unicode characters that cause errors. When I ssh into the virtual machine and look at the code, it's the exact same as what's in my editor. Nothing is being cached.

I've tried re-provisioning, editing the Vagrantfile, destroying the boxes (even in Virtualbox) and bringing it back up, and uninstalling and reinstalling vagrant all to no avail.

Can someone help me out?

Upvotes: 0

Views: 76

Answers (1)

mazerraxuz
mazerraxuz

Reputation: 363

I have been struggling with what I assume to be the same problem. Judging by the repo nginx is being used.

In nginx.conf set sendfile to off. This worked for me.

See here for more information: https://coderwall.com/p/ztskha/vagrant-apache-nginx-serving-outdated-static-files-turn-off-sendfile

Upvotes: 1

Related Questions