Enabling GZip compression on Plesk 11.5’s nginx

One of the legacy systems we still use at Flosoft.biz is Plesk. Over the last few years it has slowly gotten better (don’t worry, it still completely breaks on every version upgrade) and nowadays comes with nginx.

However, I noticed that for some obscure reason, it doesn’t enable GZip compression for the webpages it serves? This is quite odd, having myself worked a lot with nginx over the last few years, it’s a default configuration!

Don’t worry, it’s quite easy to enable it though:

Just edit the following file as root: /etc/nginx/conf.d/gzip.conf

gzip on;
gzip_proxied any;
gzip_types text/plain text/xml text/css application/x-javascript;
gzip_vary on;
gzip_disable “msie6”;

Then run nginx -t to test the configuration and if that’s all ok, restart nginx by running /etc/init.d/nginx restart.

That’s it. Your webserver will now be serving your pages with GZip compression.

2 Comments, RSS

  1. remco jansen 1. September, 2013 @ 3:22 pm

    Hi Florian,

    Here in my version 11.5.30 I can change it in webserver settings per domain (wich I prefer), no need to start a ssh client. Anyway still a good post to be aware, enabling gzip makes a huge difference!

    I keep following your great posts.


  2. Nik 27. June, 2014 @ 8:49 am

    @remco jansen
    Can you please tell us how you did it via Plesk 11.5.30 with detailed steps.. enabling gzip in webserver settings per domain???

    @Florian Jensen
    What if the server doesn’t use nginx?

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