Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Pages are GZIP compressed instead of DEFLATE

Discussion in 'EasyApache' started by Reado, Oct 24, 2018.

Tags:
  1. Reado

    Reado Well-Known Member

    Joined:
    Sep 8, 2009
    Messages:
    220
    Likes Received:
    8
    Trophy Points:
    68
    Location:
    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?
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    1,088
    Likes Received:
    442
    Trophy Points:
    113
    Location:
    Spain
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,284
    Likes Received:
    2,154
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

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

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice