Enable Keep-Alive and gzip compression ISPmanager | Anatoly Tarasenko Studio
17.08.2017

Enable Keep-Alive and gzip compression ISPmanager

Service rating website speed gtmetrix recommends to enable keep alive on the server side. And recommends it in one of the first lines.

gtmetrix screenshot
You can’t do this with ISPmanager 4 or 5. We are going to linux console.

mcedit /etc/nginx/nginx.conf

Add before include

/etc/nginx/conf.d/*

gzip on;
gzip_http_version 1.1;
gzip_disable msie6;
gzip_types text/plain application/xml application/x-javascript text/css application/javascript;

For the particular web site after this code:

location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {

We should add this:

expires 30d;