September 10, 2013

Nginx and Vagrant

I have been using Vagrant for a couple of months now, and it is a fairly good solution to my usual problem of having too many projects in the same machine.
However, I was doing some front end Javascript development today, and none of my changes was served by Nginx. I disabled caching both in browser and server, but no updates were received.
The problem is that Nginx is using the filesystem if you are making calls from your local machine, and that didn’t work very well with Virtual Box.
For my own reference, the fix was simply to add the setting:

to my nginx.conf server section.