模块 ngx_http_gzip_static_module


示例Directives
gzip_static

该模块允许 发送带有 “” 的预压缩文件 文件扩展名而不是常规文件。ngx_http_gzip_static_module.gz

默认情况下,此模块不是构建的,应使用 configuration 参数启用它。--with-http_gzip_static_module

示例配置

gzip_static  on;
gzip_proxied expired no-cache no-store private auth;

Directives

语法: gzip_static on | off | always;
默认值:
gzip_static off;
上下文: http, ,serverlocation

启用 (“”) 或禁用 (“”) 检查是否存在预压缩文件。 此外,还会考虑以下Directives:gzip_http_versiongzip_proxiedgzip_disable、 和 gzip_varyonoff

如果值为 “” (1.3.6),则使用 gzip 文件 在所有情况下,无需检查客户端是否支持它。 如果磁盘上没有未压缩的文件,这将非常有用 或使用 ngx_http_gunzip_modulealways

可以使用命令 或任何其他兼容的。 建议将原始日期及时间的修改日期和时间 压缩文件相同。gzip