免费注册 查看新帖 |

Chinaunix

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

[proxy] cache有问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-08 17:59 |只看该作者 |倒序浏览
我的squid+iptables透明代理,图片cache还行,mp3等大一点的文件感觉根本就没怎么cache。还是得一点一点来下载。大家有这样的问题没有?

squid.conf
=======================================================
[root@oa squid]# cat squid.conf
http_port 3128
cache_mem 800 MB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/cache/squid 4000 16 256
cache_access_log /var/log/squid/access.log
cache_store_log /var/log/squid/store.log
dns_nameservers 210.77.192.88

httpd_accel_host 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

acl all src 0.0.0.0/0
acl lixiaedu100 src 192.168.100.0/24
acl lixiaedu168 src 192.168.168.0/24
acl zhaobing src 10.40.17.55/32
acl zhengyi src 60.232.94.146/32

http_access allow lixiaedu100
http_access allow lixiaedu168
http_access allow zhaobing
http_access allow zhengyi
http_access deny all

cache_effective_user squid
cache_effective_group squid
visible_hostname lixiaedu
===========================================================

iptables
===========================================================
iptables -t nat -A POSTROUTING -s 192.168.100.0/24 -o eth2 -j SNAT --to 60.232.126.154
iptables -t nat -A POSTROUTING -s 192.168.168.0/24 -o eth2 -j SNAT --to 60.232.126.154
iptables -t nat -A PREROUTING -s 192.168.100.0/24 -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -s 192.168.168.0/24 -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
===========================================================


透明代理应该是起作用了,但就是感觉效果不明显。请大家给看看。
再有:
httpd_accel_host 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
上面这三句必须要加吗?(我试过,去掉任何一句都会有问题)我没有做反向代理。

论坛徽章:
0
2 [报告]
发表于 2006-01-09 08:56 |只看该作者
squid默认最大缓存对象4M
maximum_object_size 4096 KB
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP