免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1392 | 回复: 0
打印 上一主题 下一主题

[Web] Lighttpd 1.5 cache有问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-21 16:48 |只看该作者 |倒序浏览
今天测试了Lighttpd 1.5 with cache。用来与Tomcat 6进行结合,准备抛弃APACHE。
环境如下:
AS4
lighttpd 1.5 with cache
tomcat 6

但是出现了奇怪的问题,配置成功后第一次访问站点可以,但是第二次访问就报403 - Forbidden错误。看到文件已经被cache下来了。cache目录的权限看了一下也没有问题,文件也能读取,删除掉这个cache文件就好了。
我的配置如下:
cache.support-queries = "enable" #ignore '?' in url
cache.dynamic-mode = "enable"
cache.debug = "enable"
cache.bases = ("/cache") #write cached files in /data/cache directory
cache.refresh-pattern = (
        "/$" => "5 update-on-refresh no-expire-header", # update homepage every 5 minutes and on refresh requests without setting expire headers
        "\.(?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 minutes and on refresh requests
        "\.(?i)(jpg|bmp|jpeg|gif|png)$" => "2880", # update graphics files every 2 days
        "\.(?i)(rar|zip|wmv|avi|mp3|ape|rm|mpeg|mpg|wma|asf|rmvb|mp4)$" => "0 fetchall-for-range-request", # cache media file forever
        "\.(?i)(action)$" => "5" # update action request every 5 minutes
$HTTP["url"] =~ ".action|.do|.jsp|.vrf|request_ad_info.js|/js/dq/|/bfapp/|/js/monitor/|/editor/filemanager/" {
    proxy-core.balancer = "round-robin"
    proxy-core.protocol = "ajp13"
    proxy-core.backends = ( "localhost:8009" )
    proxy-core.max-pool-size = 16
    proxy-core.worked-with-modcache = "enable"
  }
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP