Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm asking this here because I'm pretty sure it's a Linux issue.

I'm running Apache server locally on Ubuntu Server 12.10, which runs inside a virtual machine (VirtualBox) on Windows 7. The "www" directory is shared between the Ubuntu VM and my Windows OS, using VirtualBox's "Share Folder" facitility.

NOTE: It's basically a local directory in windows. In Ubuntu it gets automatically mounted on startup.

The server is also accessible from my Windows host via a URL like

The thing is that images from that URL appear to be cached until I restart the virtual machine.

For example:

The URL on the Apache server running on Ubuntu points to this file c:\www\website1\images\bg.png on the Windows share. In the Ubuntu VM it exists under /var/www/website1/images/bg.png.

If I modify this file in Photoshop in my Windows host, the changes are not seen in the Ubuntu server. I suspect that Linux caches the file or something, because after restarting the VM I'll seeing the updated image.

Is there any way I could disable caching for anything under the /var/www directory? Would this decrease performance or something?

share|improve this question
have you try Ctrl + F5 in your brother ? – Kiwy Jan 28 '14 at 9:01
well that's a rocky mistyping... browser is definitely the word I was looking for... anyway thanks for the answer it was pretty nice :D – Kiwy Jan 28 '14 at 9:11
Possibly related: stackoverflow.com/questions/6921670/… – Martin von Wittich Jan 28 '14 at 9:19
This does sound exactly as described here: stackoverflow.com/questions/6298933/… – Martin von Wittich Jan 28 '14 at 9:20
Yes I would agree, this is the best lead thus far: stackoverflow.com/questions/6298933/… – slm Jan 28 '14 at 9:21
up vote 5 down vote accepted

Your problem sounds exactly like the one that's described here: Shared folder in VirtualBox for Apache

Try to add this setting to your Apache configuration:

EnableSendfile off
share|improve this answer
Issue from VB's forums: forums.virtualbox.org/viewtopic.php?f=3&t=33201 – slm Jan 28 '14 at 9:25
ok I've added that line to apache2.conf, restarted apache and now it works fine. I also tried the command you posted in the comments above and that works too, so it has something to do with the linux cache :D – Alex Jan 28 '14 at 9:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.