发布于 2015-09-19 23:50:55 | 103 次阅读 | 评论: 0 | 来源: 网络整理

Before serving a file from disk to a gzip-enabled client, this module will look for a precompressed file in the same location that ends in ".gz". The purpose is to avoid compressing the same file each time it is requested.

在开始压缩创建硬盘上的文件之前,本模块将查找同目录下同名的.gz压缩文件,以避免同一文件再次压缩。

ngx_http_gzip_static_module was introduced in nginx 0.6.24. You must enable support at compile time:

nginx 0.6.24开始加入ngx_http_gzip_static_module . 编译时加上:

./configure --with-http_gzip_static_module

例如:

gzip_static on;
 
gzip_http_version   1.1;
gzip_proxied        expired no-cache no-store private auth;
gzip_disable        "MSIE [1-6]\.";

gzip_vary           on;

指令

gzip_static

syntax: gzip_static on|off

default: gzip_static off

context: http, server, location

Enables the module. You should ensure that the timestamps of the compressed and uncompressed files match.

启动模块。您应该确保压缩和解压文件的时间戳匹配。

gzip_http_version

See NginxHttpGzipModule

gzip_proxied

See NginxHttpGzipModule

gzip_disable

See NginxHttpGzipModule

gzip_vary

See NginxHttpGzipModule

最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务