• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question Can't increase GZIP compression level

cmartinez127

Basic Pleskian
Server operating system version
Debian 11 (bullseye)
Plesk version and microupdate number
18.0.60 Update #1
I'm following the official Plesk guide to enable or modify GZIP on Plesk, but any modifications I make won't apply.
https://support.plesk.com/hc/en-us/...e-gzip-compression-in-nginx-on-a-Plesk-server

My server is running NGINX, so I go to "Domains > example.com > Hosting & DNS > Apache & nginx Settings" and add the example directives in "Additional nginx directives" field and finally "Apply", but it doesn't take effect. However if I add BROTLI directives and save changes these ones work.

I need to increase BOTLI (achieved) and GZIP (not achieved) compression levels to the maximum only for a domain to test a website. As you can see in the following screenshot, the BOTLI directives work (look at the screenshot below this one), but GZIP ones don't. No errors are displayed when I apply changes.
1718035687467.png

The following screenshot proves that BOTLI directives work and GZIP ones don't. While BOTLI increased to 11 as I specified, GZIP stays with 6.
1718036192407.png

I tried to enable GZIP compression server-wide (this is not what I need, I just need to enable this for one domain) and doesn't work that way either.

What can I do to make it work or what I'm doing wrong? If there is anything else I can provide, just let me know.
 
The Gzip compression is handled by Apache if you have Proxy Mode enabled for the domain. In which case you can add DeflateCompressionLevel 9 to the Additional Apache directives field(s).
 
The Gzip compression is handled by Apache if you have Proxy Mode enabled for the domain. In which case you can add DeflateCompressionLevel 9 to the Additional Apache directives field(s).
Hi, thank you for replying!

You're right, Proxy Mode is enabled for the domain. Unfortunately, adding
Code:
DeflateCompressionLevel 9
to the Additional Apache directives field(s) didn't work.

The website where I checked the compression level still says 6 for GZIP (I made sure the browsers weren't tricking me with cache).

What else can I do?

1718090027885.png
 
The Gzip compression is handled by Apache if you have Proxy Mode enabled for the domain. In which case you can add DeflateCompressionLevel 9 to the Additional Apache directives field(s).

I forgot to mention that I had this GZIP code in the website .htaccess file.
1718093307943.png

Unfortunately, if I add "DeflateCompressionLevel 9" inside "<IfModule mod_deflate.c>" it gives an error 500.
1718093612044.png
 
I just read that WordPress plugins like "WP Rocket" add GZIP compression rules in the .htaccess file using the mod_deflate module (which I already checked and it's enabled), that's my case. Anyways I should still be able to add and apply directives like "BrotliCompressionQuality", right?
 
Yes, you should still be able to add and apply directives like BrotliCompressionQuality even if you have GZIP compression rules in your .htaccess file. While WP Rocket adds GZIP rules using the mod_deflate module, Brotli compression is managed by a different module (mod_brotli).
 
Yes, you should still be able to add and apply directives like BrotliCompressionQuality even if you have GZIP compression rules in your .htaccess file. While WP Rocket adds GZIP rules using the mod_deflate module, Brotli compression is managed by a different module (mod_brotli).

Hi, thanks for replying!

I don't think compatibility between both is the problem, BROTLI works fine and GZIP too, but any changes I make aren't applied in GZIP. Supposedly it's possible to use both without any problem. I don't know if this some kind of bug or what I'm missing. Both mod_deflate and mod_brotli are enabled and working.
 
You can add the brotli_comp_level 11; directive to the Additional nginx directives to increase the compression level for BROTLI, if proxy mode is enabled.
 
Back
Top