Howto: enable HTTP Compression

How to enable HTTP Compression? In order to enable compression, you will need compression modules compiled with Apache. Apache 1.x needs mod_gzip and Apache 2.x need mod_deflate compiled with it.

If  you have these module installed, you need to edit your Apache configuration file locate at “/etc/httpd/conf/httpd.conf” file and add the following lines to it:

<Location />
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI  \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary

Save the file and restart the httpd service. This will compress all the files except the .gif, .jpe, .jpeg and .png files.

Related URLs:
How to enable http compression on a Plesk server?

This entry was posted on Saturday, October 10th, 2009 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

One Response to “Howto: enable HTTP Compression”

  1. toolspot

    to check if http compression is enabled or not use this tool