官网解读-Ningx-ngx_http_gzip_static_module

**

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命令或者其他任何其他兼容的命令压缩,推荐原始文件和修改文件的时间日期相同
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值