Project

General

Profile

Mod deflate » History » Revision 17

Revision 16 (Anonymous, 2008-08-28 06:33) → Revision 17/44 (mischa, 2008-11-18 12:10)

h2. mod_deflate 


 


 mod_deflate is a modified version of 
 mod_compress.    mod_deflate can compress any output from lighttpd static or 
 dynamic.    It doesn't support caching compressed output like mod_compress. 
 mod_deflate is included in 1.5.0, see How to Install section below to use 
 it with 1.4.x 


 Module options: 

 

 <pre> 

 

 deflate.enabled = "enable" 
 deflate.compression-level = 9 
 deflate.mem-level = 9 
 deflate.window-size = 15 
 # deflate.bzip2 only in patch for 1.4.x 
 deflate.bzip2 = "enable" 
 # deflate.allowed_encodings only in 1.5.x 
 deflate.allowed_encodings = ( "bzip2", "gzip", "deflate" ) 
 deflate.min-compress-size = 200 
 #deflate.sync-flush = "enable" 
 #deflate.output-buffer-size = 8192 
 deflate.work-block-size = 512 
 deflate.mimetypes = ("text/html", "text/plain", "text/css", "text/javascript", "text/xml") 
 #deflate.debug = "enable" 
 </pre> 


 


 The sync-flush option allows dynamic scripts to flush output to the browser 
 and still use compression. 
 work-block-size is the number of kilobytes to compress at one time, it allows 
 the webserver to do other work (network I/O) in between compression. 
 min-compress-size is the smallest response size that will be compressed. 

 output-buffer-size is a per connection buffer for compressed output, it can 
 help decrease the response size(fewer chunks to encode).    If it is set to 
 zero or if sync-flush is enabled a shared buffer will be used. 


 


 h3. How to install for lighttpd 1.4.x 

 

 First download the patch (download links below) and place the patch outside of the lighttpd-1.4.xx folder, then run: 

 

 <pre> 

 

 patch -p0 < lighttpd-1.4.xx-mod_deflate.diff 
 </pre> 

 

 This will patch your lighttpd-1.4.xx directory's files. Remember to change xx to the version number you are using. 

 Then: 

 

 <pre> 

 

 cd lighttpd-1.4.11 
 rm -f src/Makefile.in src/Makefile 
 automake 
 ./configure --with-bzip2 
 make 
 make install 
 </pre> 


 


 Place mod_deflate after mod_rewrite in the server.modules array in the lighttpd configuration file and enter in the mod_deflate configuration options. Remember to also enable bzip2 with the --with-bzip2 flag while doing the configure. 


 


 h3. See Also 

 

 [[Release-1.4.10-patches|Background Information of mod_deflate]] 


 


 h3. NOTE 

 

 Patch files do NOT work with lighttpd 1.4.18 & 1.4.20 1.4.19 
 Could someone please create a new patch file? 


 


 h3. Known Bug 

 

 #1709 wrong content-length with mod_fastcgi/mod_deflate combo