My favorites | Sign in
Project Logo
                
People details
Project owners:
  shellcode

Summary

lighttpd improved is lighttpd 1.4 branch with severals useful modules. We don't choose lighttpd 1.5 because lighttpd 1.5 has no official release till now. Currently mod_cache, mod_mem_compress and mod_mem_cache are included. These modules are written for faster web service, for better user experience.

mod_cache is squid-like cache module. mod_mem_cache is to cache local files into memory. mod_mem_compress is to store compress local files into memory

How to use mod_cache

mod_cache provides following options:

Refresh Patterns

cache.refresh-pattern likes squid's refresh-pattern. cache.refresh-pattern format is "url_pcre_regex" => "minutes options". Note: zero 'minutes' means cache forever and minutes option is mandatory. Available refresh-pattern options are:

Notes:

  1. mod_cache don't cache urls without refresh-pattern rules matched.
  2. make sure that mod_cache is loaded before mod_proxy.
  3. right sequence of modules is server.modules = (..., "mod_mem_compress", "mod_compress", "mod_mem_cache", "mod_cache", "mod_proxy", ...);

Cook Books:

For Static Web Server:

server.modules = (
#	....,  other modules 
	"mod_cache", # make sure mod_cache loaded before mod_proxy
	"mod_proxy"
)
cache.support-queries = "enable"
cache.bases = ("/data/cache")
cache.refresh-pattern = (
	"\.(?i)(flv)$" => "0 fetchall-for-range-request flv-streaming",
	"\.(?i)(js|css|xml)$" => "240", # update js/css/xml every 4 hours
	"\.(?i)(htm|html|shtml)$" => "30 update-on-refresh", #update html/htm/shtml every 30 minutes and on refresh requests
	"\.(?i)(jpg|bmp|jpeg|gif|png)$" => "2880",
	"\.(?i)(rar|zip|wmv|avi|mp3|ape|rm|mpeg|mpg|wma|asf|rmvb|flv)$" => "0 fetchall-for-range-request",
	"." => "30 update-on-refresh"
)
proxy.server  = ( "/" =>
        (
                ( "host" => "x.x.x.x", "port" => 80 )
        )
)

For BBS or Forum server

server.modules = (
#	....,  other modules 
	"mod_cache",
	"mod_proxy"
)
cache.support-queries = "enable"
cache.dynamic-mode = "enable"
cache.bases = ("/data/cache")
cache.refresh-pattern = (
	"\.(?i)(flv)$" => "0 fetchall-for-range-request flv-streaming",
	"\.(?i)(js|css|xml)$" => "240",
	"\.(?i)(htm|html|shtml)$" => "30",
	"\.(?i)(jpg|bmp|jpeg|gif|png)$" => "2880",
	"\.(?i)(rar|zip|wmv|avi|mp3|ape|rm|mpeg|mpg|wma|asf|rmvb|flv)$" => "0 fetchall-for-range-request",
	".(?i)php$" => "5" # update php request every 5 minutes
)

proxy.server  = ( "/" =>
        (
                ( "host" => "x.x.x.x", "port" => 80 )
        )
)

#cache.programs-ext = (".php") # uncomment this if mod_fastcgi was loaded on this lighttpd server

Changelog

Stable Version 1.8.2, 11/20/2009

Stable Version 1.8.1, 11/01/2009

Stable Version 1.8.0, 06/06/2009

Stable Version 1.7.0, 04/30/2009

Stable Version 1.6.3, 02/18/2009

Stable Version 1.6.2, 02/17/2009

Stable Version 1.6.0/1.6.1, 09/01/2008

Stable Version 1.4.4, 04/09/2008

Stable Version 1.4.2/1.4.3, 02/29/2008

Stable Version 1.4.1, 09/23/2007

Stable Version 1.4, 05/03/2007

Stable Version 1.3.2, 02/08/2007

Stable Version 1.3.1, 01/29/2007

Stable Version 1.3, 01/23/2007

Stable Version 1.2, 11/28/2006

Stable Version 1.1, 11/17/2006

Stable Version 1.0, 10/27/2006









Hosted by Google Code