mod_deflate not working; am I missing a step?

GoWilkes

Well-Known Member
Sep 26, 2006
486
12
168
cPanel Access Level
Root Administrator
I'm moving from an old server to a new one.

In setting up the new server, one of my first steps was recompiling Apache with all of the usual modules, including mod_deflate.

I'm getting ready to make the new server live, but I did a Gzip compression test, here:

GIDZipTest: Web Page Compression (Deflate / Gzip) Test - GIDNetwork

and it comes back as not compressed.

I looked in /usr/local/apache/conf/httpd.conf, and there's no mention of "deflate". But there's no mention of it in the httpd.conf file on my old server, either, which IS compressed.

Am I missing a step? Or is it not compressing because the domain is pinging the old server, and then the DNS records redirect it to the new server (making the old server a proxy)?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

Here is a snippet from our documentation on Mod_Deflate:

EasyApache enables mod_deflate by default, but you must enable compression for each individual web site. You can enable compression for an individual web site with the Optimize Website (Home >> Software/Services >> Optimize Website) interface in cPanel.
Thank you.
 

dalem

Well-Known Member
PartnerNOC
Oct 24, 2003
2,977
152
368
SLC
cPanel Access Level
DataCenter Provider
if you want to set all domains to use mod_deflate add to Apache include

SetOutputFilter DEFLATE


# Don’t compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary


# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary