防止 VirtualBox 来宾传送缓存文件 [英] Prevent VirtualBox Guest from Delivering Cached Files

查看:26
本文介绍了防止 VirtualBox 来宾传送缓存文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的开发环境中编辑文件并将它们保存到我的来宾操作系统 (CentOS) 后,来宾会提供已编辑文件(.css 或 .js)的缓存版本.

After editing files in my development environment and saving them to my guest OS (CentOS), the Guest delivers a cached version of the edited files (.css or .js).

起初我认为这是一个本地浏览器缓存问题,但我已经删除、禁用、焚烧了所有 4 个浏览器和笔记本电脑(非主机)硬盘中的每个本地缓存.

At first I thought this was a local browser caching issue, but I've deleted, disabled, incinerated, etc every local cache in all 4 browsers and in the laptop (non-host) hard drive.

此外,我使用一台机器(从未访问过访客)进行测试,访客仍然发送未编辑的文件.

In addition, I tested using a machine (that has never accessed the guest) and the guest still delivered the unedited files.

然后我禁用了 Apache 中的所有缓存模块 - 我很确定(但不是肯定的 - 并且对任何建议持开放态度)Apache 不是罪魁祸首.

I've then disabled all caching modules in Apache - I'm pretty sure (but not positive - and open to any suggestions) Apache is not the culprit.

我的客人或我的主人正在以某种方式/某处缓存文件,我无法弄清楚如何或在哪里.

Either my guest or my host is caching files somehow/somewhere and I can't figure out how or where.

这是一个非常令人沮丧的 48 小时 - 任何帮助将不胜感激.

This has been a very frustrating 48 hours - any help would be greatly appreciated.

背景:

  • VirtualBox v 4.0.12
  • 来宾:CentOS 5.5/LAMP(用作本地开发服务器)内部 IP 192.168.12.62
  • 主机:Windows Server 2008(网络配置:桥接)内部 IP 192.168.12.42
  • 开发文件存储在主机上,并通过共享文件夹"与来宾共享
  • 应用程序开发是在通过映射的网络驱动器连接到主机的第三台机器(笔记本电脑)上完成的.内部 IP 192.168.12.32
  • 我为 Apache 配置了大​​量虚拟 IP 192.168.12.150-180
  • 如果我遗漏了什么,请告诉我.

推荐答案

这个 论坛帖子 确认了问题.这是错误报告.Vboxsf 不能很好地与 sendfile 配合使用.Apache 解决方法,如前面提到的:

This forum post confirms the problem. Here's the bug report. Vboxsf doesn't play nicely with sendfile. The Apache workaround, as previously mentioned:

EnableSendFile Off

对于好奇的人,这里是 SendFile 文档.

For the curious, here's the SendFile docs.

这篇关于防止 VirtualBox 来宾传送缓存文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆