lighttpd默认是没有开启expire模块的,需要我们在使用是手工开启这个模块支持。把mod_expire前面的“#”号去掉。
# vi /usr/local/lighttpd/etc/lighttpd.conf
"mod_expire",
设定过期时间
* 设定指定url的过期时间:
expire.url = (
"/images/" => "access 3 hours",
"/admin/" => "access 3 hours",
"/area/" => "access 3 hours",
"/calendar/" => "access 3 hours",
"/common/" => "access 3 hours",
"/front/" => "access 3 hours",
"/inc/" => "access 3 hours",
"/jeditor/" => "access 3 hours",
"/js/" => "access 3 hours",
"/script/" => "access 3 hours",
"/theme/" => "access 3 hours",
"/upload/" => "access 3 hours",
"/view/" => "access 3 hours",
"/help/" => "access 3 hours",
"/htm/" => "access 5 minutes"
)
设置Etag
在配置文件中增加,etag.use-inode=”disable”(i节点不参与etag的运算),保证多台服务器生成的Etag值一致。
阅读(1377) | 评论(0) | 转发(0) |