暂时不记那么多,详细的自己谷歌吧。添加以下代码到nginx.conf的http中即可:

gzip on;
gzip_http_version 1.0;
gzip_disable "MSIE [1-6].";
gzip_types text/plain application/x-javascript text/css text/javascript;

Related Posts: 开启Nginx的gzip压缩功能详解 :