Enable gzip compression for Nginx per site
By default, Nginx doesn't enable gzip compression for serving files. This is commonly used to reduce the filesize of CSS and Javascript files, if they haven't been minified or pre-compressed. This guide will show you how to enable it per site for a Plesk 12.5 or Onyx based server.
Instructions
- Login to your Plesk server.
- Select the domain you wish to enable gzip for from the left hand side.
- Click in Apache and nginx settings:
- Down the bottom, 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;
- Click OK to save.