配制lighttpd mod_mem_cache模块文档
#cd lighttpd-1.4.13
#wget http://www.linux.com.cn/doc/lighttpd-1.4.13.mod_mem_cache.v1.2.patch
#patch -p0 < ./lighttpd-1.4.13.mod_mem_cache.v1.2.patch
#./configure --prefix=/usr/local/lighttpd
#make && make install
#vi /usr/local/lighttpd/etc/lighttpd.conf
一、添加模块:server.modules = (
.
.
"mod_mem_cache",
.
.
)二、配制参数:
只对image.tianya.cn站点起作用,默认是全局。
mem-cache.enable = "disable"
$HTTP["host"] == "image.tianya.cn" {
server.document-root = "/www/master/image/"
index-file.names = ( "index.shtml", "index.html",
"index.htm", "default.htm" )
mem-cache.enable = "enable"
mem-cache.filetypes = ("application/x-javascript", "text/css", "text/html", "text/javascript")
mem-cache.max-memory = 1024
mem-cache.max-file-size = 1024
mem-cache.expire-time = 180
}
#kill lighttpd进程PID
#/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf
搞定!
#wget http://www.linux.com.cn/doc/lighttpd-1.4.13.mod_mem_cache.v1.2.patch
#patch -p0 < ./lighttpd-1.4.13.mod_mem_cache.v1.2.patch
#./configure --prefix=/usr/local/lighttpd
#make && make install
#vi /usr/local/lighttpd/etc/lighttpd.conf
一、添加模块:server.modules = (
.
.
"mod_mem_cache",
.
.
)二、配制参数:
只对image.tianya.cn站点起作用,默认是全局。
引用
mem-cache.enable = "disable"
$HTTP["host"] == "image.tianya.cn" {
server.document-root = "/www/master/image/"
index-file.names = ( "index.shtml", "index.html",
"index.htm", "default.htm" )
mem-cache.enable = "enable"
mem-cache.filetypes = ("application/x-javascript", "text/css", "text/html", "text/javascript")
mem-cache.max-memory = 1024
mem-cache.max-file-size = 1024
mem-cache.expire-time = 180
}
#kill lighttpd进程PID
#/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf
搞定!