I'm setting up a new WHM/cPanel server. Using EasyApache, I've updated Apache to version 2.2.24, and under "Exhaustive Options", I have "Deflate" checked. But the output does not appear to be compressed, and when I look at httpd.conf, I don't find "deflate" referenced anywhere in the file.
I looked through my old server's httpd.conf file, too (which has Apache 2.0.64), and also didn't find any reference to "deflate". But, it's definitely gzip compressed, according to several online tools. So even though I found a few tutorials online that said to uncomment specific lines in the httpd.conf file, that doesn't seem to be the same thing that I had before, since those lines never existed yet the server was still compressing.
Just to be clear, I'm wanting to compress everything to use the least amount of bandwidth possible, even if it does create more of a load on the CPU. I have plenty of CPU to spare, but not bandwidth.
Further, I did find references to adding the following to the top of all pages:
<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
ob_start("ob_gzhandler");
else ob_start();
?>
But of course, this has the limitations that:
1. It only works on PHP pages;
2. It requires an update to hundreds, maybe thousands of pages; and
3. It relies on the account owners to continue adding it themselves, instead of it being automatically loaded.
Any advice on how to enable Gzip or mod_deflate correctly would be very appreciated! TIA,
Jason
I looked through my old server's httpd.conf file, too (which has Apache 2.0.64), and also didn't find any reference to "deflate". But, it's definitely gzip compressed, according to several online tools. So even though I found a few tutorials online that said to uncomment specific lines in the httpd.conf file, that doesn't seem to be the same thing that I had before, since those lines never existed yet the server was still compressing.
Just to be clear, I'm wanting to compress everything to use the least amount of bandwidth possible, even if it does create more of a load on the CPU. I have plenty of CPU to spare, but not bandwidth.
Further, I did find references to adding the following to the top of all pages:
<?php
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
ob_start("ob_gzhandler");
else ob_start();
?>
But of course, this has the limitations that:
1. It only works on PHP pages;
2. It requires an update to hundreds, maybe thousands of pages; and
3. It relies on the account owners to continue adding it themselves, instead of it being automatically loaded.
Any advice on how to enable Gzip or mod_deflate correctly would be very appreciated! TIA,
Jason