5. Compressed deliveryThere are basically two modules available for output compression: mod_gzip and mod_gunzip. They are using different approaches to reach the the goal of bandwidth reduction. mod_gunzip expects compressed file on the filesystem, and uncompress them if the browser cannot handle compressed data. The benefit is a low cpu-usage, because most browsers are capable to handle gzipped content. On the oder side, most of today's content is served dynamically i.e. PHP, and this content will be delivered uncompressed. mod_gzip does not need compressed files on the system, all defined content will be compressed before delivery. The benefit is to have the dynamically generated content also compressed, the other side is a higher cpu-usage, because every request has to be compressed on-the-fly. Mod_gzip can handle already compressed data i.e. index.html.gz and send it as-is. The conclusion: You carefully have to make a decision which of the two modules makes more sense for you. If you have to pay for every GB delivered and CPU-power does not matter, then mod_gzip is the choice for you. If response time matters (delay between request and delivery), and your bandwidth is cheap or unlimited, mod_gunzip matches your needs better. A good page that helps you to make this decision is Martin Kiff's document about mod_gunzip http://www.innerjoin.org/apache-compression/howto.html 5.1. mod_gzip5.1.1. Download the sourceOrigin-Site: http://prdownloads.sourceforge.net/mod-gzip/mod_gzip-1.3.26.1a.tgz?download 5.1.2. Building and installingTo successfully compile mod_gzip you need to edit the Makefile and provide the correct path to apxs
5.1.3. Sample configurationPut the following in your /usr/local/apache/conf/httpd.conf: Example 5. /usr/local/apache/conf/httpd.conf
You may whish to log the result of the compression to your accesslog. This can be done by changing the LogFormat directive in /usr/local/apache/conf/httpd.conf
5.2. mod_gunzip5.2.1. Download the sourceOrigin-Site: http://www.oldach.net/mod_gunzip.tar.gz 5.2.2. Building and installing
Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |