GZIP Config for NGINX
# GZIP Config
gzip on;
gzip_min_length 1000;
# gzip_http_version 1.0; # if you want HTTP1.0 compressed
# allows CDNs to cache compressed and uncompressed versions
# for various clients that could ask for uncompressed data
gzip_vary on;
# gzip_comp_level 6; # By default, gzip_comp_level 1; you can increase to up to 9 but you wont see much difference unless you are compress large text data
# enables compression for all proxied requests.
gzip_proxied any;
gzip_types text/plain text/html text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
# disable GZIP for legacy browsers that don’t support it (not sure if they still exist)
gzip_disable “MSIE [1-6].(?!.*SV1)”;
# make sure gzip does not lose large gzipped js or css files
# see [https://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl](https://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl "https://blog.leetsoft.com/2007/7/25/nginx-gzip-ssl")
# gzip_buffers 16 8k; is the default and should cover most large css/js/etc files