Followed this and it works 100%
http://www.garron.me/en/linux/enable-gzip-mod_deflate-compression-apache.html
Question
I have a apache/php server and am trying to optimize my site by enabling compression.
I have checked out numerous articles and they say you need to create a .htaccess file. I've tried that with:
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
I then tried http://www.feedthebot.com/tools/gzip/ and it reports my web site is not using compression.
What am I missing?
This is from phpinfo:
Loaded Modules core mod_access_compat mod_so http_core prefork mod_unixd mod_systemd mod_actions mod_alias mod_auth_basic mod_authn_file mod_authz_host mod_authz_groupfile mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_expires mod_include mod_log_config mod_mime mod_negotiation mod_setenvif mod_ssl mod_userdir mod_php5 mod_reqtimeout mod_authn_core mod_authz_core
Solution
Followed this and it works 100%
http://www.garron.me/en/linux/enable-gzip-mod_deflate-compression-apache.html