Nginx ngx_http_gunzip_module子產品基本指令整理
2013-02-20nginxsch
原創文章,轉載請指明出處并保留原文url位址
本文主要針對nginx的ngx_http_gunzip_module子產品做簡單介紹,本文具體包括如下指令:
Gunzip,gunzip_buffers
ngx_http_gunzip_module是個過濾子產品,這個子產品為那些不支援gzip子產品的用戶端解壓縮gzip格式相應的相應。這個子產品對存儲壓縮存儲的資料以及節省磁盤空間及減少I/O等有很大好處。這個子產品不是預設的内模組化塊,他需要通過–with-http_gunzip_module配置指令進行配置。
配置示例
location /storage/ {
gunzip on;
…
}
Nginx原文:
The ngx_http_gunzip_module module is a filter that decompresses responses with “Content-Encoding: gzip” for clients that do not support “gzip” encoding method. The module will be useful when it is desirable to store data compressed, to save space and reduce I/O costs.
This module is not built by default, it should be enabled with the –with-http_gunzip_module configuration parameter.
Example Configuration
gunzip on;
1. Gunzip
syntax:
Gunzip on | off;
default:
gunzip off;
context:
http, server, location
啟用或者禁止為那些缺乏gzip功能支援的用戶端提供解壓縮服務。如果功能被打開,下面的一些指令被考慮是用戶端支援gzip功能, 指令包括:: gzip_http_version, gzip_proxied, and gzip_disable, 另外可以參見gzip_vary指令。
Enables or disables decompression of gzipped responses for clients that lack gzip support. If enabled, the following directives are also taken into account when determining if clients support gzip: gzip_http_version, gzip_proxied, and gzip_disable. See also the gzip_vary directive.
2. gunzip_buffers
gunzip_buffers numbersize;
gunzip_buffers 32 4k|16 8k;