Skip to content

Vagrant and Apache – caching behavior without a cache – SOLVED

Sometimes a very strange behavior (bug?) happens between Vagrant and Apache running inside the vagrant box. It feels like there is some kinda cache, as changes in files on the host seem to have no effect on a file served by Apache.

Solution:

in your httpd configuration (/etc/httpd/conf/httpd.conf) change EnableSendfile to off:

# rw: disable sendfile when using inside a Vagrant / VM evironment!!
# can cause file changes to be ignored, even if caching is disabled!!!
EnableSendfile off

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.