http {
gzip on;
gzip_min_length 500;
gzip_proxied any;
gzip_comp_level 4;
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml;
gzip_vary on;
gzip_disable "msie6";
... here come your server blocks / rest of your config
}
Рекомендуемые параметры сжатия:
gzip on;
gzip_static on;
gzip_comp_level 2;