You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
637 B
21 lines
637 B
# 开启gzip |
|
gzip on; |
|
|
|
# 启用gzip压缩的最小文件,小于设置值的文件将不会压缩 |
|
gzip_min_length 1k; |
|
|
|
# gzip 压缩级别,1-10,数字越大压缩的越好,也越占用CPU时间 |
|
gzip_comp_level 6; |
|
|
|
# 进行压缩的文件类型。javascript有多种形式。 |
|
# 其中的值可以在 mime.types 文件中找到。 |
|
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; |
|
|
|
# 是否在http header中添加Vary: Accept-Encoding,建议开启 |
|
gzip_vary on; |
|
|
|
# 禁用IE 6 gzip |
|
gzip_disable "MSIE [1-6]\."; |
|
|
|
|
|
|
|
|