SOLVED Pages are GZIP compressed instead of DEFLATE

Reado

Well-Known Member
Sep 8, 2009
222
8
68
United Kingdom
cPanel Access Level
Root Administrator
I have mod_deflate enabled in EA4 and I am testing using both Firefox and Chrome (latest stable versions).

The domain is set to use PHP-FPM and the PHP Handler is CGI (the only option).

When I load a simple PHP/HTML page, the headers state it's using GZIP compression.

Part of the .htaccess file reads:

Code:
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding

AddOutputFilterByType DEFLATE "application/atom+xml" \
                              "application/javascript" \
                              "application/json" \
                              "application/ld+json" \
                              "application/manifest+json" \
                              "application/rdf+xml" \
                              "application/rss+xml" \
                              "application/schema+json" \
                              "application/vnd.geo+json" \
                              "application/vnd.ms-fontobject" \
                              "application/wasm" \
                              "application/x-font-ttf" \
                              "application/x-javascript" \
                              "application/x-web-app-manifest+json" \
                              "application/xhtml+xml" \
                              "application/xml" \
                              "font/collection" \
                              "font/eot" \
                              "font/opentype" \
                              "font/otf" \
                              "font/ttf" \
                              "image/bmp" \
                              "image/svg+xml" \
                              "image/vnd.microsoft.icon" \
                              "image/x-icon" \
                              "text/cache-manifest" \
                              "text/calendar" \
                              "text/css" \
                              "text/html" \
                              "text/javascript" \
                              "text/plain" \
                              "text/markdown" \
                              "text/vcard" \
                              "text/vnd.rim.location.xloc" \
                              "text/vtt" \
                              "text/x-component" \
                              "text/x-cross-domain-policy" \
                              "text/xml"
                            
AddEncoding gzip svgz
The response headers are:

Code:
HTTP/2.0 200 OK
date: Wed, 24 Oct 2018 08:34:24 GMT
server: Apache
content-encoding: gzip
vary: Accept-Encoding
strict-transport-security: max-age=16070400; includeSubDomains; preload
cache-control: max-age=2592000, no-transform
expires: Fri, 23 Nov 2018 08:34:24 GMT
x-content-type-options: nosniff
content-type: text/plain;charset=UTF-8
X-Firefox-Spdy: h2
Any idea why mod_deflate is not being used?
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
457
113
UK
cPanel Access Level
Root Administrator
The pages are being sent compressed as stated by the content-encoding: gzip response header.

If you can see the page in a web browser in the layout and format that is intended, then mod_deflate is working to unzip the page and display it.

You would not normally see any response header that refers to the mod_deflate process.
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

The previous post is correct. I've marked this thread as solved.

Thank you.