Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  Plesk FAQ  >  How to Enable gzip Compression for Nginx Per Site?
Top Scroll

How to Enable gzip Compression for Nginx Per Site?

 2 min

Generally, gzip compression isn’t enabled by Nginx for serving files. If CSS and Javascript files aren’t minified or pre-compressed, gzip compression is commonly used to reduce the filesize of these files. This guide will display the way to enable it per site for a Plesk 12.5 or Onyx based server.

  1. Login to your Plesk server.
  2. From the left hand side, select the domain that you want to enable gzip for.
  3. Click on Apache and nginx settings as below:
  4. At 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;

  5. In order to save, click on OK.

The working of gzip compression can be verified by using your browser’s debug tools or third party website such as GTMetrix.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
Claim the discount before it’s too late. Use the coupon code:
Note: Copy the coupon code and apply it on checkout.