NGINX on VirtualBox; sendfile-Strangeness

Published on 05 Jul 2016 , edited on 22 Mar 2019

Running Vagrant in VirtualBox is a great way to make a local dev setup for any webdeveloper. Except for when you encounter the strangeness of the sendfile-bug in this combination which has been here for over 8 years now (!).
What happens is this; you create (say) a style.css and fill it with your complete css. Save it, refresh, ta-dah.

VPjKd8NBut then you decide to change something, and the changes don’t reflect. You refresh and you refresh, you clear all the caches, browse incognito mode, smash two keyboards to pieces by ramming CTRL+F5, and the changes still do not reflect.
So what do you do? Clean out the file – save it as empty and bam, there are your changes (well, the lack of actually).

So then you paste everything back; and you’re back at square one; no changes. Then you decide to leave out everything but just put one simple line in; now we see what’s happening. For some kind of mysterious reason the old css is always shown, but only the character amount of the (actual) file.

Now this appears to have to do with the sendfile setting. What you need to do is add sendfile off in nginx.conf. Now to figure out why my NGINX doesn’t pick up on the new setting

And the life of a developer goes on and on..

Edit: Apparently it’s some markup.


Everything web development related, rants, snippets, tutorials, quests; it’s all there.

All categories

All tags

All posts