## [ngx_http_gzip_module][1]
在文件傳輸過程中是否開啟壓縮,
>[success]gzip
默認值: off
是否開啟壓縮
>[success]gzip_buffers
默認值: 4 4k/8k
用于指定存放壓縮響應的緩沖的數量和大小。如果沒有設定,則等于一個頁面的大小。
>[success]gzip_comp_level
默認值: 1
用于設定壓縮級別,1是最小壓縮率,9是最大壓縮率。
>[success]gzip_min_length
默認值:20
設置響應體的最小長度
>[success]gzip_types mime-type
默認值:text/html;
指定需要壓縮的mime類型
>[success]gzip_vary on | off;
默認值:off
是否向響應頭中添加vary:`Accept-Encoding HTTP`
## [ngx_http_gzip_static_module][2]
>[success]gzip_static on | off | always;
默認值:off;
開啟這個功能,會查找與請求文件同名并且以gz結尾的文件,這個文件被稱為預壓縮格式,我們先進行了壓縮,以后就不會重復進行壓縮了。
~~~
gzip -c index.html > index.html.gz
~~~
[1]:http://nginx.org/en/docs/http/ngx_http_gzip_module.html
[2]:http://nginx.org/en/docs/http/ngx_http_gzip_static_module.html
- nginx的功能
- nginx常用變量
- Nginx內核模塊
- Nginx的事件模塊
- Nginx的HTTP模塊
- Nginx的fastcgi
- nginx的proxy
- Upstream實現后臺服務器集群
- 文件操作優化相關的配置
- Nginx模塊管理和進程管理
- 模塊管理
- 進程管理
- 針對Nginx的Linux系統優化
- Nginx如何處理一個請求
- nginx狀態信息
- Nginx工具
- Nginx限制流量
- Nginx限制用戶的并發連接數
- 配置FLV服務器
- Nginx訪問控制
- Nginx自動索引
- Nginx網頁壓縮傳輸
- 控制Nginx如何記錄日志
- Nginx改寫響應
- Nginx重寫
- 后臺Nginx記錄原始原始IP
- Nginx防盜鏈
- Nginx的https