Common configuration example NGINX GZIP

{Server 
    ... 
    the gzip ON; 
    # the CDN and proxy servers for the same url, can return a copy of the compressed and uncompressed header information according to 
    # gzip_vary ON; 
    # unconditionally compression 
    gzip_proxied the any; 
    # 1-9 compression level, the higher the compression small more CPU resource consumption 
    gzip_comp_level. 6; 
    # result storing compressed data stream to 8k units to 16 times the memory allocation 
    gzip_buffers 16 8k; 
    # compressed MIME type, reference may be the conf / the mime.types 
    gzip_types Image / XML + SVG text / plain text / xml text / css text / javascript application / xml application / xhtml + xml application / rss + xml application / javascript application / x-javascript application / x-font-ttf application / vnd.ms-fontobject font / opentype font / font TTF / EOT font / OTF; 
}

Guess you like

Origin www.cnblogs.com/qiutianjia/p/11574022.html