官網解讀-Ningx-ngx_http_gzip_static_module

**

Module ngx_http_gzip_static_module

**
Example Configuration
Directives
gzip_static
The ngx_http_gzip_static_module module allows sending precompressed files with the “.gz” filename extension instead of regular files.//ngx_http_gzip_static_module//模塊允許發送擴展名爲.gz的預壓縮文件而不是常規文件。
在這裏插入圖片描述
在這裏插入圖片描述

This module is not built by default, it should be enabled with the --with-http_gzip_static_module configuration parameter.//這個模塊默認不會創建,他應該用–with-http_gzip_static_module配置參數啓用。

Example Configuration

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

Directives

Syntax:	gzip_static on | off | always;
Default:	
gzip_static off;
Context:	http, server, location

Enables (“on”) or disables (“off”) checking the existence of precompressed files. The following directives are also taken into account: gzip_http_version, gzip_proxied, gzip_disable, and gzip_vary.//啓動或者關閉通過檢查預壓縮文件的存在性,以下指令也被考慮在內
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述

With the “always” value (1.3.6), gzipped file is used in all cases, without checking if the client supports it. It is useful if there are no uncompressed files on the disk anyway or the ngx_http_gunzip_module is used.//使用always這個值的時候,壓縮文件被用於任何情況,不用檢查客戶端是否支持。如果磁盤裏面沒有任何被壓縮過的文件或者ngx_http_gunzip_module模塊被使用,這將非常有用。
在這裏插入圖片描述
The files can be compressed using the gzip command, or any other compatible one. It is recommended that the modification date and time of original and compressed files be the same.//文件可以被gzip命令或者其他任何其他兼容的命令壓縮,推薦原始文件和修改文件的時間日期相同
在這裏插入圖片描述
在這裏插入圖片描述
在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章