HTTP compression in Apache is provided by the module named “mod_deflate”. Enable and configure mod_deflate as follows to enable HTTP compression:
Stop the Apache server.
Edit APACHE_HOME/conf/httpd.conf and enable the mod_deflate module, if necessary:
Disabled (commented out):
#LoadModule deflate_module modules/mod_deflate.so #LoadModule filter_module modules/mod_filter.so
Enabled:
LoadModule deflate_module modules/mod_deflate.so LoadModule filter_module modules/mod_filter.so
Edit the VirtualHost entry in APACHE_HOME/conf/httpd.conf that was
created in the section mod_proxy (Apache) and add
the mod_deflate-related entries, which are shown in bold:
<VirtualHost 192.168.1.2:80>
ServerName ekm.yourdomain.com
AddOutputFilterByType DEFLATE text/html text/plain text/xml
DeflateFilterNote Input input_info
DeflateFilterNote Output output_info
DeflateFilterNote Ratio ratio_info
LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
CustomLog deflate.log deflate
</VirtualHost>Start the Apache server.