The Nginx nginx_http_gzip_module compression provides file content compression function allows Nginx server outputting content 2 transmits compressed before client, so that the file content becomes smaller transmission speed becomes faster, in order to save bandwidth the site to enhance the user experience, The default module has been installed!
[root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf
gzip on; gzip _min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain text/javascript application/x-javascrip t text/css text/xml application/xml application/xml+rss;
[root@localhost ~]# nginx -t
[root@localhost ~]# killall -s HUP nginx