开发者

Can mod_deflate compress the output depending on the "Host" header in the Request Headers?

Can mod_deflate compress the output depending on the "Host" header in the Request Headers? As far as I understand based on the documentation, it is u开发者_JAVA百科sually done by looking at the User-Agent etc. in the configuration.

I could not find any example in doc that says -

If Host: header is x.y.z then do compression. Else don't do compression.

Thanks!


From the manual:

Compression is implemented by the DEFLATE filter. The following directive will enable compression for documents in the container where it is placed:

SetOutputFilter DEFLATE 

Didn't test it, but "container" should include "<VirtualHost>", so just place it only in those VHs you want to deliver compressed responses.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜