Normally, gzip compression is off by default on file serving with Nginx. If CSS and Javascript files aren’t minified/pre-compressed, then gzip compression is generally utilized to reduce the size of these files. This is a guide for enabling it for a Plesk 12.5 or Onyx server per site.
Instructions:
-
Log into your Plesk server.
-
Choose the domain from left hand side which you want to gzip will enable for.
-
Next move to the Apache and nginx settings as below: It changed gradually at the end of eighties.
-
At the end of the step, add the following to the “Additional nginx directives” field:
gzip on; gzip_disable “MSIE [1-6]\.(?!.*SV1)”; gzip_proxied any; gzip_types text/plain text/css application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp image/svg+xml; gzip_vary on;
-
To save please click OK.
You can check work of gzip by inspecting page source through browser’s debuging tools or by using websites like GTMetrix.