GZIP Compression
This article describes how to enable GZIP compression for all Managed Servers. You can enable GZIP compression for all or selected websites.
Enable for All Websites
First, log in to your server via SSH. You can find your SSH login credentials in the Login Credentials section of the Customer Center under the menu item Servers → Virtual Servers → Login Credentials.
Create a new nginx configuration file in the directory /etc/nginx/conf.d/gzip.conf with the following content:
gzip on;
gzip_disable "MSIE [1-6]\\.(?!.*SV1)";
gzip_proxied any;
gzip_comp_level 5;
gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on; Then restart the NGINX proxy server:
nginx -t
/etc/init.d/nginx reload Enable for Individual Websites
Log in to your server’s Plesk Control Panel and select the website for which you want to enable gzip compression. Use the Apache & nginx Settings button to configure additional nginx directives.
In the Additional nginx Directives section, enter the following directives:
gzip on;
gzip_disable "MSIE [1-6]\\.(?!.*SV1)";
gzip_proxied any;
gzip_comp_level 5;
gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml;
gzip_vary on; Example:
You can then save the changes by clicking OK, and they will take effect immediately for the selected website.