读书人

nginx 配备 gzip 传输

发布时间: 2012-07-04 19:33:54 作者: rapoo

nginx 配置 gzip 传输

在 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/

?


?

读书人网 >开源软件

热点推荐