Example Configuration
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/xml;
The $gzip_ratio variable can be used to log the achieved compression ratio.
上面是官网中关于gzip配置的样例!
Syntax: gzip on | off;
Default: gzip off;
Context: http, server, location, if in location
Enables or disables gzipping of responses.
以上参数解释:1default:表示默认配置
2.contexn:执行上下文!就是这段配置在配置文件中写在哪里!
去官网读原配置文件,是一种快速的学习方式!
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/xml;
The $gzip_ratio variable can be used to log the achieved compression ratio.
上面是官网中关于gzip配置的样例!
Syntax: gzip on | off;
Default: gzip off;
Context: http, server, location, if in location
Enables or disables gzipping of responses.
以上参数解释:1default:表示默认配置
2.contexn:执行上下文!就是这段配置在配置文件中写在哪里!
去官网读原配置文件,是一种快速的学习方式!
编辑回复