Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Howto: enable HTTP Compression  (Read 2500 times)

0 Members and 1 Guest are viewing this topic.

Aby

  • Guest
Howto: enable HTTP Compression
« on: November 01, 2013, 11:15:33 pm »

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:


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.