• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk 11.5 and ngix gzip compression

ManuelG2k

Basic Pleskian
Hello,
I have Plesk Panel 11.5 on Linux Ubuntu 12.04.
It's possible to enable ngix gzip compression for *.js and *.css ?
how can I do?

Tnx in advance
Manuel
 
As possible solution create the file: /etc/nginx/conf.d/gzip.conf

Enter the following:

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

Then restart nginx in Plesk Services Management. Note that text/html doesn’t need to be specified with gzip_types (and in fact produces a configuration warning if you try). Once you set gzip on, nginx automatically assumes text/html as a gzip type.
 
Tnx IgorG ;)

Another question.
For Leverage Browser caching, if possible to enable for default on my all domains on plesk ?

The ngix code should be

location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 30d;
log_not_found off;
}

If I insert this sintax on nginx.conf, nginx test failed :\
 
Last edited:
Not sure but maybe it can be added to main nginx config /etc/nginx/nginx.conf ?
 
Hello,

I wanted to add the nginx gzip compression on a Plesk 11.5.30 (Debian 7) and I added a file called gzip.conf in the folder IgorG said with the code IgorG said and I receive an error:

root@server:/etc/nginx/conf.d# /etc/init.d/nginx restart

[FAIL] Restarting NGINX: nginx failed!

If I delete the file and restart nginx all is correct.

Anybody knows why I have the error with the file?

Thanks
 
Back
Top