Speedy website is the major concern for end user. Webhosting provider or who hosting their own websites have the ability to improve website performance hosted on Plesk 12.5
There are lot of ways to improve your website performance, caching, reducing content size, lazy load of image files and many others.
In this demonstration I will show you how to improve website performance by http compression.
People who do not know about http compression, they can check the Wikipedia page for detailed information.
On Plesk Linux website can be served by nginx or apache.
First check whether your websites are serving by nginx or apache.
# netstat -plant | grep ':80' tcp 0 0 10.0.50.14:80 0.0.0.0:* LISTEN 10968/nginx
In this example websites are serving by nginx.
Default Plesk installation does not comes with any http compression enabled.
Improve website performance hosted on Plesk 12.5
In order to enable gzip compression follow the below steps:
Create /etc/nginx/conf.d/gzip.conf with the following content:
Test the configuration and fix errors (if any):
# nginx -t
Reload nginx configuration:
# service nginx reload
Other gzip_types available for compression can be obtained from /etc/nginx/mime.types
What about the Apache ?
Apache already build with mod_deflate, so no need to change any configuration.
Just add the following snippet to your .htaccess file
Verify if the http compression is working properly, go to http://www.whatsmyip.org/http-compression-test/
It should look like this
Congratulation’s! You have successfully enabled http compression for the websites. Thanks for using this tutorial for improve website performance hosted on Plesk 12.5.