免费注册 查看新帖 |

Chinaunix

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

[proxy] 请教squid代理为什么不刷新cache内容啊? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-24 15:12 |只看该作者 |倒序浏览
配置文件如下;
http_port *.*.*.*:80
acl StaticContent urlpath_regex "/usr/local/squid/etc/static_content"
no_cache deny !StaticContent
cache_mem 200 MB
cache_dir aufs /cahe 1024 16 256
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
access_log /bak/log/squid/access.log combined
cache_log /bak/log/squid/cache.log
cache_store_log none
emulate_httpd_log on
useragent_log /bak/log/squid/useragent.log
referer_log /bak/log/squid/referer.log
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .             525600    100%    525600      ignore-reload
acl purge_host src *.*.*.*/255.255.255.255
acl all src 0.0.0.0/0.0.0.0
acl picture urlpath_regex "/usr/local/squid/etc/picture"
acl picture1 url_regex "/usr/local/squid/etc/picture"
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443 563     # https, snews
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl CONNECT method CONNECT
acl purge method PURGE
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow purge purge_host
http_access deny purge
http_access deny picture1
http_access allow all
http_reply_access allow all
icp_access allow all
cache_mgr webmaster
cache_effective_user support
cache_effective_group support
httpd_accel_host localhost
httpd_accel_port 80
httpd_accel_single_host on
httpd_accel_uses_host_header on
logfile_rotate 7



请问大家:
我用ip访问发现cache的内容能更新,但用域名访问就是更新不了,不知道问题出在哪里,最后我只能手动purge来清空cache内容来实现,希望得到大家支持,谢谢

论坛徽章:
0
2 [报告]
发表于 2007-05-24 18:25 |只看该作者
缓存了,你设置一下refresh 就可以啊!

论坛徽章:
0
3 [报告]
发表于 2007-05-25 00:15 |只看该作者
能说的具体一点吗?是refresh_pattern .             525600    100%    525600      ignore-reload吗?

难道改成refresh_pattern .             0   100%    0      ,
但为什么用ip访问能从服务器端获取更新的页面呢?用域名访问就不行啊

论坛徽章:
0
4 [报告]
发表于 2007-05-25 09:31 |只看该作者
原帖由 kingnowok 于 2007-5-25 00:15 发表
refresh_pattern .             525600    100%    525600      ignore-reload

你也太。。了,525600/60/24=365,你还加了ignore-reload参数,等于365天后,cache才会更新。

[ 本帖最后由 suek 于 2007-5-25 09:32 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2007-05-25 09:41 |只看该作者
楼上的我明白,可你还是没回答我,为什么IP访问可以获取服务器端的更新消息呢?
那我改成refresh_pattern .             1440  100%    1440,是不是就是说明一天以后,squid就会从服务器端获取更新页面了?不过这样感觉对服务器压力太大,有没好一点的解决办法。谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP