- 论坛徽章:
- 0
|
大家好
根据以前CU中的帖子,我想配置一下SQUID的集群,主要使用PARENT,SILBING,在使用过程中,我使用了2台机器,都使用UBUNTU8.0操作系统,使用SQUID2.6做反向代理,
A机器:192.168.18.7 这台机器的8080端口上跑着APACHE 80端口SQUID
B机器:192.168.18.12 80端口SQUID
A机器的CONF文件
# set by font
#
#http_port 80
http_port 192.168.18.7:80 vhost vport
#
#acl OverConnLimit maxconn 16 #限制同一IP最大连接数
#http_access deny OverConnLimit
#
acl Manager proto cache_object #允许本地管理
acl Localhost src localhost
http_access allow Manager Localhost
http_access deny Manager
#
#acl allowed_methods method GET
#acl allowed_methods method POST
#acl allowed_methods method HEAD
#只允许80端口做代理
acl all src 0.0.0.0/0.0.0.0
acl gsrc src 192.168.18.12 192.168.18.7
acl gdst dst 192.168.18.12 192.168.18.7
http_access allow gsrc
http_access allow gdst
acl Safe_ports port 80 8080 3132 3133
http_access deny !Safe_ports
http_access allow all
#never_direct allow all
#never_direct allow all
#http_reply_access allow all
#SQUID信息设置
visible_hostname 192.168.18.7
cache_mgr webmaster@good8.com
#基本设置
cache_effective_user proxy
cache_effective_group proxy
tcp_recv_bufsize 65536 bytes
#反响代理加速配置
cache_peer 192.168.18.7 parent 8080 0 no-query originserver no-digest name=cache0
cache_peer 192.168.18.12 sibling 80 3133 name=cache2
cache_peer_access 192.168.18.12 allow all
#单台使用,不使用该功能
icp_port 3132
#htcp_port 4827
icp_query_timeout 2000
icp_access allow all
igest_generation on
log_icp_queries on
icp_hit_stale on
cache_dir ufs /var/spool/squid 10240 16 256
#为了调试方便,目录结构设置的相当简单,实际应用要多建一些
#dns_children 32
hosts_file /etc/hosts
cache_mem 400 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 32768 KB
maximum_object_size_in_memory 4096 KB
emulate_httpd_log on
cache_store_log /var/log/squid/store.log
cache_log /var/log/squid/cache.log
B机器的CONF文件
# set by font
#
#http_port 80
http_port 192.168.18.12:80 vhost vport
#
#acl OverConnLimit maxconn 16 #限制同一IP最大连接数
#http_access deny OverConnLimit
#
acl Manager proto cache_object #允许本地管理
acl Localhost src localhost
http_access allow Manager Localhost
http_access deny Manager
#
#acl allowed_methods method GET
#acl allowed_methods method POST
#acl allowed_methods method HEAD
#只允许80端口做代理
acl all src 0.0.0.0/0.0.0.0
acl gsrc src 192.168.18.12 192.168.18.7
acl gdst dst 192.168.18.12 192.168.18.7
http_access allow gsrc
http_access allow gdst
acl Safe_ports port 80 8080 3132 3133
http_access deny !Safe_ports
http_access allow all
#never_direct allow all
#never_direct allow all
#http_reply_access allow all
#SQUID信息设置
visible_hostname 192.168.18.12
cache_mgr webmaster@good8.com
#基本设置
cache_effective_user proxy
cache_effective_group proxy
tcp_recv_bufsize 65536 bytes
#反响代理加速配置
cache_peer 192.168.18.7 parent 8080 0 no-query originserver no-digest name=cache0
cache_peer 192.168.18.7 sibling 80 3132 name=cache1
cache_peer_access 192.168.18.7 allow all
#cache_peer 192.168.18.7 parent 8080 0 no-query originserver no-digest name=cache0
#单台使用,不使用该功能
icp_port 3133
#htcp_port 4827
icp_query_timeout 2000
icp_access allow all
igest_generation on
log_icp_queries on
icp_hit_stale on
cache_dir ufs /var/spool/squid 10240 16 256
#为了调试方便,目录结构设置的相当简单,实际应用要多建一些
#dns_children 32
hosts_file /etc/hosts
cache_mem 400 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 32768 KB
maximum_object_size_in_memory 4096 KB
emulate_httpd_log on
cache_store_log /var/log/squid/store.log
cache_log /var/log/squid/cache.log
现在症状主要是如果CACHE过期了,他就从PARENT取,而不从SILBING取数据。所以想询问一下各位,如何才能从SILBING取数据。
[ 本帖最后由 font99 于 2008-6-11 19:47 编辑 ] |
|