Output compression reduces the network load and can improve the overall throughput of the webserver. All major http-clients support compression by announcing it in the Accept-Encoding header. This is used to negotiate the most suitable compression method. Lighttpd support deflate, gzip and bzip2
Deflate (RFC1950, RFC1951) and gzip (RFC1952) depend on zlib while bzip2 depends on libbzip2. bzip2 is only supported by lynx and some other console text-browsers.
Lighttpd limit to compression support to static files. mod_compress can store compressed files on disk to optimize the compression on a second request away. As soon as compress.cache-dir is set the files are compressed.
(You will need to create the cache directory if it doesn't already exist. The web server will not do this for you. The directory will also need the proper ownership. For Debian/Ubuntu the user and group ids should both be www-data.)
The module limits the compression of files to files smaller than 128 MByte and larger than 128 Byte. The lower limit is set as small files tend to become larger by compressing due to the compression headers, the upper limit is set to work sensibly with memory and cpu-time. In fact, if you are on a low end server, you may get better performance if you disable mod_compress.
Configure mod_compress
Compressing Dynamic Content, examp : PHP
To test
Read more http://blogmee.info/index.php/save-traffic-and-banwidth-with-lighttpds-mod_compress/
No comments:
Post a Comment