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 http://192.168.56.101/website1
.
The thing is that images from that URL appear to be cached until I restart the virtual machine.
For example:
The URL http://192.168.56.101/website1/images/bg.png
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?
-
have you try Ctrl + F5 in your brother ?Kiwy– Kiwy2014年01月28日 09:01:51 +00:00Commented Jan 28, 2014 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 :DKiwy– Kiwy2014年01月28日 09:11:46 +00:00Commented Jan 28, 2014 at 9:11
-
1Possibly related: stackoverflow.com/questions/6921670/…Martin von Wittich– Martin von Wittich2014年01月28日 09:19:22 +00:00Commented Jan 28, 2014 at 9:19
-
1This does sound exactly as described here: stackoverflow.com/questions/6298933/…Martin von Wittich– Martin von Wittich2014年01月28日 09:20:40 +00:00Commented Jan 28, 2014 at 9:20
-
1Yes I would agree, this is the best lead thus far: stackoverflow.com/questions/6298933/…slm– slm ♦2014年01月28日 09:21:32 +00:00Commented Jan 28, 2014 at 9:21
1 Answer 1
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
-
Issue from VB's forums: forums.virtualbox.org/viewtopic.php?f=3&t=332012014年01月28日 09:25:57 +00:00Commented Jan 28, 2014 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 :DAlex– Alex2014年01月28日 09:27:16 +00:00Commented Jan 28, 2014 at 9:27
You must log in to answer this question.
Explore related questions
See similar questions with these tags.