我怎样才能$ P $与Apache 2.X的mod_deflate模块P-COM preSS文件? [英] How can I pre-compress files with mod_deflate in Apache 2.x?

查看:148
本文介绍了我怎样才能$ P $与Apache 2.X的mod_deflate模块P-COM preSS文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我服通过Apache与内容编码的所有内容:邮编,但在飞行中的COM presses。我的内容的一个良好的数额是磁盘上的静态文件。我想gzip压缩文件事先而不是COM $ P $每次收到请求时pssing他们。

I am serving all content through apache with Content-Encoding: zip but that compresses on the fly. A good amount of my content is static files on the disk. I want to gzip the files beforehand rather than compressing them every time they are requested.

这是什么,我相信,在Apache的1.x的 mod_gzip的做自动,但只是有以.gz旁边的文件。这不再与 mod_deflate模块的情况。

This is something that, I believe, mod_gzip did in Apache 1.x automatically, but just having the file with .gz next to it. That's no longer the case with mod_deflate.

推荐答案

这个功能在mod_gzip的错位反正。在Apache的2.x中,你做到这一点与内容协商。具体来说,您需要启用多视​​图通过 选项指令,你需要用的 AddEncoding 指令

This functionality was misplaced in mod_gzip anyway. In Apache 2.x, you do that with content negotiation. Specifically, you need to enable MultiViews with the Options directive and you need to specify your encoding types with the AddEncoding directive.

这篇关于我怎样才能$ P $与Apache 2.X的mod_deflate模块P-COM preSS文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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