Chinaunix首页 | 论坛 | 博客
  • 博客访问: 81811
  • 博文数量: 12
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 130
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-08 23:23
文章分类

全部博文(12)

文章存档

2010年(1)

2008年(1)

2007年(10)

我的朋友

分类: BSD

2007-03-15 11:38:15

# 监测端口,直接监听80端口,本机其它服务不使用80端口,如本机也有Web服务器,则使用Web服务器使用其它端口
http_port 80 transparent

# 设置访问本机的Web服务器,服务器为8080端口
cache_peer 192.168.0.201 parent 8080 0 no-query originserver name=
cache_peer_domain

# 设置访问内网其它的Web服务器,服务器为80端口
# .elitehome.cn表示泛域名支持,此处即表示除上述的www地址外的其它所有地址
cache_peer 192.168.0.108 parent 80 0 no-query originserver name=.elitehome.cn
cache_peer_domain .elitehome.cn .elitehome.cn

visible_hostname CNC_Garden
cache_mgr
maximum_object_size 32768 KB
maximum_object_size_in_memory 128 KB # Cache在memory中最大Object的大小
memory_pools_limit 21 MB # 小对象内存池的大小
cache_dir null /tmp
cache_mem 64 MB
cache_effective_user squid
cache_effective_group squid
acl all src 0.0.0.0/0
acl cnc src 218.26.203.192/28
http_access allow cnc
http_access deny all
cache_access_log /var/log/squid-access.log
cache_log /var/log/squid-cache.log
cache_store_log /var/log/squid-store.log
error_directory /usr/local/etc/squid/errors/Simplify_Chinese
pid_filename /var/run/squid.pid
# Timeouts
read_timeout 5 seconds
half_closed_clients off
connect_timeout 5 seconds
memory_pool_limit并不是小对象池的大小,相当于malloc的cache,squid并不直接对释放的对象调用free操作,而是等到这个大小超过到这个大小超过memory_pool_limit才会真正释放. 感觉比较合适的大小是cache_mem + memory_pool_limit < 实际内存量, memory_pool_limit在150M左右就差不多了.当然还有为系统别的程序留一点余量。
阅读(2145) | 评论(0) | 转发(0) |
0

上一篇:vi用法详解

下一篇:sheel文件测试

给主人留下些什么吧!~~