Squid 3.0 (加速模式)完整配置文件

acl inner src 192.168.12.43
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl self myip 192.168.12.43
acl SSL_ports port 443
acl Safe_ports port 3128
acl Safe_ports port 80          # http
acl Safe_ports port 81          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
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
acl uploads dstdomain .xxx.com
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
 
http_access allow inner
http_access allow uploads
http_access allow purge inner
http_access allow manager localhost
http_access allow manager inner
http_access deny manager
http_access deny all
icp_access allow localnet
icp_access deny all
htcp_access allow localnet
htcp_access deny all
http_port 81 accel transparent vhost vport


#cache_peer *.*.*.* parent 80  0 no-query no-digest originserver name=appsvr
#cache_peer *.*.*.* parent 80 0 no-query round-robin max-conn=1024 originserver

cache_peer 127.0.0.1 parent 80 0 no-query originserver name=appsvr
cache_peer_domain  appsvr up1.xxx.xx.com
cache_peer_access appsvr allow all
hierarchy_stoplist cgi-bin ?
cache_mem 3072 MB
maximum_object_size_in_memory 1024 KB
cache_dir null /opt/squid3/var/cache
access_log /opt/squid3/var/logs/access.log squid
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern (cgi-bin|/?)    0       0%      0
refresh_pattern .               0       20%     4320
refresh_pattern -i /.js 10000 100% 30000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
refresh_pattern -i /.jpg 10000 100% 30000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
refresh_pattern -i /.jpeg 10000 100% 30000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
refresh_pattern -i /.gif 10000 100% 30000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
refresh_pattern -i /.png 10000 100% 30000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
refresh_pattern -i /.swf 10000 100% 30000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
refresh_pattern -i /.ico 10000 100% 30000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
refresh_pattern -i /.bmp 10000 100% 30000 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private
cache_effective_user squid
cache_effective_group squid
visible_hostname  up1.xx.xxx.com
icp_port 3130
coredump_dir /opt/squid3/var/cache

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值