我在 Ubuntu 上安装了标准的 Apache2。
我试图让 mod_deflate 工作,它确实如此,但注意到它没有压缩我的 .js 文件。仔细检查发现apache 没有发送 Content-Type: 用于 .php 文件以外的任何内容。对他们来说,它发送的是“text/html”,这很奇怪,因为 DefaultType 是“text/plain”。
我不知道这是为什么... mod_mime 已启用,我还没有触及它的配置。
这是我的服务器对 .css 文件的示例响应:
Date Wed, 11 Mar 2009 04:48:12 GMT
Server Apache/2.2.9 (Ubuntu)
Connection Keep-Alive
Keep-Alive timeout=15, max=96
Etag "30478-4fb-464bec553a600"
Vary Accept-Encoding