模块 ngx_http_gzip_static_module
示例Directives gzip_static |
这ngx_http_gzip_static_module
module 允许
发送带有 ”.gz
”
文件扩展名而不是常规文件。
这个模块不是默认构建的,它应该使用--with-http_gzip_static_module
configuration 参数。
示例配置
gzip_static on; gzip_proxied expired no-cache no-store private auth;
Directives
语法: |
gzip_static
|
---|---|
默认值: |
gzip_static off; |
上下文: |
http ,server ,location |
启用 (”on
“) 或禁用 (”off
”)
检查是否存在预压缩文件。
此外,还会考虑以下Directives:gzip_http_version、gzip_proxied、gzip_disable、
和 gzip_vary。
使用”always
“ 值 (1.3.6),则使用 gzip 文件
在所有情况下,无需检查客户端是否支持它。
如果磁盘上没有未压缩的文件,这将非常有用
或使用 ngx_http_gunzip_module。
可以使用gzip
命令
或任何其他兼容的。
建议将原始日期及时间的修改日期和时间
压缩文件相同。