NGINX/Apache Caching bug on Vagrant

If you are running NGINX or Apache within a Virtualbox using Vagrant, you may encounter unintentional, persistent caching within the webserver. If so, try turning off sendfile.

This is due to a bug/issue with the sendfile syscall (h/t @mitchelh) that servers typically use to serve static files.

It’s solved with a webserver configuration option:

Apache
EnableSendfile Off

NGINX
sendfile off;