Gzip taking precedence over Brotli

ebizindia

Well-Known Member
Oct 13, 2005
105
4
168
Kolkata, India
cPanel Access Level
Root Administrator
I have both Brotli and Gzip enabled on my dedicated server. Centos 6.10, EA4.

However, the pages are delivered with Gzip compression and not Brotli, to the browsers that accept both.

Can you suggest the solution for this? TIA.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,263
313
Houston
Hello @ebizindia

  1. Can you tell me how you're determining that gzip is taking precedence over brotli?
  2. Can you show me the configuration for both brotli and gzip?
  3. Which is listed first in the configuration?

Thanks!
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,263
313
Houston
Hello,

The modules are stored in /etc/apache2/conf.modules.d/ in most cases. You can view the apache configuration by running
Code:
cat /etc/apache2/conf/httpd.conf
For apache brotli needs to be specified in the configuration first or gzip will be used instead. The forum post here goes over this: Brotli, Gzip correct order
 

ebizindia

Well-Known Member
Oct 13, 2005
105
4
168
Kolkata, India
cPanel Access Level
Root Administrator
Sorry, I am missing something.

There is no mention of Brotli in the httpd.conf you referred above. Also, the /etc/apache2/conf.modules.d/ directory only has a 170_mod_deflate.conf which refers to a .so file.

Please give a little more detail.