免费注册 查看新帖 |

Chinaunix

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

[proxy] 关于squid加速web使用中的一些问题(日志和cache管理),请看看! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-16 09:51 |只看该作者 |倒序浏览
使用squid配置了一个web加速反响代理服务器,对3个域名进行cache,测试过程中有2个要求无法实现:
一。日志管理。3个域名的访问日志都集中在access.log 中,可否按照域名和时间使产生的日志分开,
    比如 abcaccess10102006.log   defaccess10102006.log
      ,squid是否有这样的功能呢,或者是否要借助其他软件呢,我尝试过sarg,它只能产生报告,无法自动的产生日志。
    另外我希望产生这样日志的目的在于统计每个域名的page view 数和用户数。
二。cache的管理。我加速的3个域名都是静态页面 (html htm) 所以我无需对每个域名下所有的文件进行定时刷新 ,只需要对特定的页面进行cache刷新,
    比如 www.abc.com/index.htm   www.def.com/index3.htm ,请问能否实现,如何配置,谢谢!


贴出我的squid.conf

# visible name
visible_hostname cache.example.com
# cache config: space use 1G and memory use 256M
cache_dir ufs /usr/local/squid/cache 1024 16 256
cache_mem 256 MB
cache_effective_user squid
cache_effective_group squid

http_port 80
httpd_accel_host virtual
httpd_accel_single_host off
httpd_accel_port 80
httpd_accel_uses_host_header on
httpd_accel_with_proxy on
# accelerater my domain only
acl acceleratedHostA dstdomain www.abc.com
acl acceleratedHostB dstdomain www.def.com
acl acceleratedHostC dstdomain www.ghi.com
# accelerater http protocol on port 80
acl acceleratedProtocol protocol HTTP
acl acceleratedPort port 80
# access arc
acl all src 0.0.0.0/0.0.0.0
# Allow requests when they are to the accelerated machine AND to the
# right port with right protocol
http_access allow acceleratedProtocol acceleratedPort acceleratedHostA
http_access allow acceleratedProtocol acceleratedPort acceleratedHostB
http_access allow acceleratedProtocol acceleratedPort acceleratedHostC
# logging
emulate_httpd_log on
cache_store_log none
# manager
acl manager proto cache_object
http_access allow manager all
http_access allow all
http_reply_access allow all
icp_access allow all
cachemgr_passwd pass all

[ 本帖最后由 summerstone 于 2006-8-16 10:07 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-08-16 11:44 |只看该作者
CACHE怎么管理呀?能否告诉一下。谢谢。。

论坛徽章:
0
3 [报告]
发表于 2006-08-16 12:54 |只看该作者

回复 2楼 wildcat707 的帖子

期待大家的帮忙!谢谢

论坛徽章:
0
4 [报告]
发表于 2006-08-16 17:33 |只看该作者
如果squid单独用做加速:
httpd_accel_host virtual  多余
httpd_accel_with_proxy on不仅加速,还开了代理。安全方面很难控制。
icp_access allow all   用到cache堆叠了么?

个人之见。

论坛徽章:
0
5 [报告]
发表于 2006-08-16 19:15 |只看该作者
原帖由 phpman 于 2006-8-16 17:33 发表
如果squid单独用做加速:
httpd_accel_host virtual  多余
httpd_accel_with_proxy on不仅加速,还开了代理。安全方面很难控制。
icp_access allow all   用到cache堆叠了么?

个人之见。


谢谢斑竹的指点,我会做更具我的具体情况做修改,不过上面关于日志和cache的问题能否帮忙给些意见呢,呵呵,谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP