Enabling GZip compression on Plesk 11.5’s nginx

by Florian Jensen

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.


One Comment to “Enabling GZip compression on Plesk 11.5’s nginx”

  1. 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.


Leave a Reply