### HttpGzipStatic
Before serving a file from disk to a gzip-enabled client, this module will look for a precompressed file in the same location that ends in ".gz". The purpose is to avoid compressing the same file each time it is requested.
在开始压缩创建硬盘上的文件之前,本模块将查找同目录下同名的.gz压缩文件,以避免同一文件再次压缩。
ngx_http_gzip_static_module was introduced in nginx 0.6.24. You must enable support at compile time:
nginx 0.6.24开始加入ngx_http_gzip_static_module . 编译时加上:
~~~
./configure --with-http_gzip_static_module
~~~
例如:
~~~
gzip_static on;
gzip_http_version 1.1;
gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;
~~~
### 指令
### gzip_static
**syntax:***gzip_static on|off*
**default:***gzip_static off*
**context:***http, server, location*
Enables the module. You should ensure that the timestamps of the compressed and uncompressed files match.
启动模块。您应该确保压缩和解压文件的时间戳匹配。
### gzip_http_version
See [NginxHttpGzipModule](# "NginxHttpGzipModule")
### gzip_proxied
See [NginxHttpGzipModule](# "NginxHttpGzipModule")
### gzip_disable
See [NginxHttpGzipModule](# "NginxHttpGzipModule")
### gzip_vary
See [NginxHttpGzipModule](# "NginxHttpGzipModule")
- 主要文档
- Nginx功能概述
- 为什么选择Nginx
- Nginx安装
- 运行和控制Nginx
- 配置符号参考
- 优化 Nginx
- 常见问题(FAQ)
- 调试 nginx
- 核心模块
- Nginx主模块
- Nginx事件模块
- 基本模块
- http核心模块
- HttpIndex模块
- HttpAccess模块
- HttpAuthBasic模块
- HttpAutoindex模块
- Browser模块
- Charset模块
- HttpEmptyGif模块
- HttpFcgi模块
- Geo模块
- HttpGzip模块
- HttpHeaders模块
- HttpIndex模块
- HttpReferer模块
- HttpLimit zone
- HttpLimitReqest模块
- HttpLog模块
- map
- Memcached
- HttpProxy模块
- HttpRewrite模块
- HttpSSI模块
- HttpUserId
- 其他模块
- Addition模块
- EmbeddedPerl
- flv
- HttpGzipStatic
- RandomIndex
- HttpGeoIP
- HttpRealIp
- HttpSSL
- StubStatus模块
- HttpSubstitution
- HttpDav模块
- GooglePerftools
- HttpXSLT
- HttpSecureLink
- HttpImageFilter
- mail模块
- MailCore
- MailAuth
- MailProxy
- MailSSL
- 安装
- nginx在windows上的安装
- nginx在freebsd上的安装
- nginx在ubuntu上的安装
- nginx在fedora上的安装
- nginx php-fpm安装配置
- 配置示例和方法
- 完整例子
- 完整例子2
- 虚拟主机
- 负载均衡
- nginx防盗链
- HWLoadbalancerCheckErrors