### 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