Author Topic: enable Gzip  (Read 8633 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
enable Gzip
« on: January 11, 2018, 03:06:33 AM »
Hi
I enable Gzip by this guide http://idroot.net/tutorials/how-to-enable-gzip-compression-on-apache/


#LoadModule deflate_module modules/mod_deflate.so change to LoadModule deflate_module modules/mod_deflate.so

Open httpd.conf file using a text editor and place the following in it:

# mod_deflate configuration
<IfModule mod_deflate.c>
 
# Restrict compression to these MIME types
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/css
 
# Level of compression (Highest 9 - Lowest 1)
DeflateCompressionLevel 9
 
# Netscape 4.x has some problems.
BrowserMatch ^Mozilla/4 gzip-only-text/html
 
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
 
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
 
</IfModule>

and then retart the apache server

Now i use Gizp checker tool https://checkgzipcompression.com/, my website support Gizp, but when i use https://developers.google.com/speed/pagespeed/insights/ check speed of my website, google PageSpeed Insights show i need to enable Gzip compression, what's the problem?

I use https://nixcp.com/tools/gzip-test/, it is said my website does not support Gzip compression.

my Centos webpanel has install Varnish by select webservers->Apache & Varnish Cache & Nginx Reverse Proxy->Save& rebuild configuration
« Last Edit: January 11, 2018, 03:18:07 AM by gailclark80 »

Offline
***
Re: enable Gzip
« Reply #1 on: January 12, 2018, 04:57:31 AM »
you forgot to restart Varnish to delete all cached
very simple, just reboot the server