Home » Control Panel » Plesk » Improve website performance hosted on Plesk 12.5

Improve website performance hosted on Plesk 12.5

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

For Nginx

In order to enable gzip compression follow the below steps:

Step 1

Create /etc/nginx/conf.d/gzip.conf with the following content:

gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
gzip_proxied any;
gzip_types text/plain text/css image/jpeg image/png image/x-icon text/xml application/xml application/xml+rss text/javascript application/javascript application/json;
gzip_vary on;

This is an example. It is possible to add in gz_types – application/javascript, application/js, etc.

Step 2

Test the configuration and fix errors (if any):

# nginx -t

Step 3

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

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain text/css image/jpeg image/png image/x-icon text/xml application/xml application/xml+rss text/javascript application/javascript application/json
</IfModule>

Step 4

Verify if the http compression is working properly, go to http://www.whatsmyip.org/http-compression-test/

It should look like this

http-compression-test

 

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.

Check Also

Install DKIM and DMARC on Plesk 12.5

Now a days mail is an unavoidable part of life. How ever the misuse of …

Leave a Reply

Your email address will not be published. Required fields are marked *