server.port = 3001
cache.support-queries = "enable"
cache.debug = "enable"
cache.bases = ("/opt/cache")
cache.refresh-pattern = (
"\.(?i)(flv)$" => "0 fetchall-for-range-request flv-streaming",
# to w>>ork with mod_flv_streaming for flv files
"\.(?i)(js|css|xml)$" => "240", # update js/css/xml every 4 hours and
>>on refresh requests
"\.(?i)(htm|html|shtml)$" => "30", # update html/htm/shtml every
30 mi>>nutes and on refresh requests
"\.(?i)(jpg|bmp|jpeg|gif|png)$" => "2880", # update graphics
files eve>>ry 2 days
"\.(?i)(rar|zip|wmv|avi|mp3|ape|rm|mpeg|mpg|wma|asf|rmvb|flv)$"
=> "0 >>fetchall-for-range-request", # cache media file forever
"." => "30 update-on-refresh" # default to update every 30
minutes and>> on refresh requests
)
##mod_proxy setting, config your backend servers here
proxy.server = ( ".jpg" =>
(
( "host" => "192.168.1.242", "port" => 3001 ) # real backend
http server ip and port
)
)
##it's important to enable proxy.worked-with-mod-cache or mod_proxy will
not cooperate with modcache
proxy.worked-with-mod-cache = "enable"
$HTTP["host"] == "192.168.1.242" {
server.document-root = "/var/rails_work/v2/public"
server.error-handler-404 = "/dispatch.fcgi"
fastcgi.server = (".fcgi" =>
("localhost" =>
("min-procs" => 1,
"max-procs" => 4,
"socket" => "/tmp/lighttpd/socket/rails.socket",
"bin-path" =>
"/var/rails_work/v2/public/dispatch.fcgi",
"bin-environment" => ("RAILS_ENV" => "production")
)
)
)
}-
I just want I can cache my static picture file , How to setup
lighttpd.conf?
在 2009-08-19三的 13:44 +0800,shellcode写道: