Nginx参考手册
ngx_http_gzip_static_module
ngx_http_gzip_static_module
- 示例配置
- 指令
- gzip_static
该ngx_http_gzip_static_module
模块允许使用“ .gz
”文件扩展名而不是普通文件发送预压缩文件。
该模块不是默认生成的,它应该使用--with-http_gzip_static_module
配置参数启用。
示例配置
gzip_static on;
gzip_proxied expired no-cache no-store private auth;
指令
句法: |
gzip_static 总是开启 | 关闭| ; |
---|---|
默认: |
gzip_static off; |
语境: |
http,服务器,位置 |
启用(“ on
”)或禁用(“ off
”)检查预压缩文件的存在。以下指令也被考虑在内:gzip_http_version,gzip_proxied,gzip_disable和gzip_vary。
使用“ always
”值(1.3.6),所有情况下都会使用gzip文件,而不检查客户端是否支持它。如果磁盘上没有未压缩的文件或者使用了ngx_http_gunzip_module,这很有用。
这些文件可以使用该gzip
命令或任何其他兼容的文件进行压缩。建议原始文件和压缩文件的修改日期和时间相同。
ngx_http_gzip_static_module |
---|
Nginx是一款轻量级的 Web 服务器/反向代理服务器及电子邮件代理服务器,可在 BSD-like 协议下发行。其特点是占有内存少,并发能力强。
主页 | https://nginx.org/ |
源码 | http://hg.nginx.org/nginx |
发布版本 | 1.13.6 |