nginx 配置 gzip 传输

来源:互联网 发布:xml json 编辑:程序博客网 时间:2024/05/29 14:52

在 nginx.conf 文件中加入

 

 #启用gzip压缩
 gzip on;
 gzip_min_length  1000;
 gzip_buffers     4 8k;  
 gzip_http_version 1.1;
 ##针对ie6保障浏览器不假死
 gzip_disable "MSIE [1-6].";
 gzip_types       text/plain application/x-javascript text/css text/html application/xml;

 

注意 在 http {  中一定要有 include       mime.types;

 

监测网站是否启用了gzip :http://gzip.zzbaike.com/

 


 

0 0
原创粉丝点击