GZIP compression
This article describes how to activate gzip compression for all Managed Servers. You have the option of activating gzip compression for all or selected websites.
Activate for all websites
First log in to your server via SSH. You can find the SSH access data in the Access data area in the Customer Center under the menu item Server → Virtual server → Access data.
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 reload the NGINX proxy server:
nginx -t
/etc/init.d/nginx reload
Activate for individual websites
Log in to the Plesk Control Panel of your server and select the website for which you want to activate gzip compression. You can use the Settings for Apache & nginx button to specify additional nginx directives.
Enter the following instructions in the Additional nginx directives area:
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:
The changes can then be saved via OK and are immediately applied to the selected website.