**
Module ngx_http_gzip_static_module
**
Example Configuration
Directives
gzip_static
The ngx_http_gzip_static_module module allows sending precompressed files with the “.gz” filename extension instead of regular files.//ngx_http_gzip_static_module//模块允许发送扩展名为.gz的预压缩文件而不是常规文件。
This module is not built by default, it should be enabled with the --with-http_gzip_static_module configuration parameter.//这个模块默认不会创建,他应该用–with-http_gzip_static_module配置参数启用。
Example Configuration
gzip_static on;
gzip_proxied expired no-cache no-store private auth;
Directives
Syntax: gzip_static on | off | always;
Default:
gzip_static off;
Context: http, server, location
Enables (“on”) or disables (“off”) checking the existence of precompressed files. The following directives are also taken into account: gzip_http_version, gzip_proxied, gzip_disable, and gzip_vary.//启动或者关闭通过检查预压缩文件的存在性,以下指令也被考虑在内
With the “always” value (1.3.6), gzipped file is used in all cases, without checking if the client supports it. It is useful if there are no uncompressed files on the disk anyway or the ngx_http_gunzip_module is used.//使用always这个值的时候,压缩文件被用于任何情况,不用检查客户端是否支持。如果磁盘里面没有任何被压缩过的文件或者ngx_http_gunzip_module模块被使用,这将非常有用。
The files can be compressed using the gzip command, or any other compatible one. It is recommended that the modification date and time of original and compressed files be the same.//文件可以被gzip命令或者其他任何其他兼容的命令压缩,推荐原始文件和修改文件的时间日期相同