squid-cdn配置

post by rocdk890 / 2011-7-4 18:10 Monday linux技术

# squid conf etc/squid.conf
# Created by https://blog.slogra.com
# Last Updated 2011.07.04

###
cache_effective_user squid
cache_effective_group squid
tcp_recv_bufsize 65535 bytes
icp_port 0
visible_hostname wdcdn
http_port 80 vhost vport

#domains

#peer_domain

#acl
acl local src 127.0.0.1
acl Manager proto cache_object
acl purge method PURGE
http_access allow Manager local purge
http_access deny Manager purge
acl alls src all
http_access allow alls

###cache,dir
cache_log /www/wdlinux/squid/var/logs/cache.log
access_log /www/wdlinux/squid/var/logs/access.log squid
cache_dir ufs /www/wdlinux/squid/var/cache/ 10000 16 256
maximum_object_size 1024 KB
maximum_object_size_in_memory 1024 KB
cache_mem 512 MB
cache_swap_low  80
cache_swap_high 90
ipcache_size 512
ipcache_low 90
ipcache_high 95
fqdncache_size 512

### timeout
connect_timeout 1 minute
peer_connect_timeout 30 seconds
request_timeout 2 minutes
persistent_request_timeout 30 seconds
dns_children 3
hierarchy_stoplist cgi-bin ?

#refresh_pattern
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern -i \.jpg$ 43200 50% 86400
refresh_pattern -i \.png$ 43200 50% 86400
refresh_pattern -i \.css$ 43200 50% 86400
refresh_pattern -i \.js$ 43200 50% 86400
refresh_pattern -i \.xml$ 43200 50% 86400
refresh_pattern -i \.htm$ 43200 50% 86400
refresh_pattern -i \.html$ 43200 50% 86400
refresh_pattern .               0       20%     4320

#header off
via off
reply_header_access Via deny all
reply_header_access Server deny all

夜空- 本站版权
1、本站所有主题由该文章作者发表,该文章作者与夜空享有文章相关版权
2、其他单位或个人使用、转载或引用本文时必须同时征得该文章作者和夜空的同意
3、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
4、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
5、原文链接:blog.slogra.com/post-15.html

标签: squid 缓存 反向代理 cdn

评论: