# squid conf etc/squid.conf
# Created by 51cto.com
# Last Updated 2010.11.20
###
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
hosts_file /etc/hosts
include /www/wdlinux/squid/etc/site/site.conf
acl cdndomain dstdomain "/www/wdlinux/squid/etc/site/domainlist.txt"
#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
always_direct allow cdndomain
http_access allow alls
###
cache_log /www/wdlinux/squid/var/logs/cache.log
access_log /www/wdlinux/squid/var/logs/access.log squid
include /www/wdlinux/squid/etc/conf/disk.conf
#refresh_pattern
include /www/wdlinux/squid/etc/conf/refresh_pattern.conf
connect_timeout 1 minute
peer_connect_timeout 30 seconds
read_timeout 2 minutes
request_timeout 2 minutes
client_lifetime 5 minutes
persistent_request_timeout 30 seconds
maximum_icp_query_timeout 2000
dead_peer_timeout 100000000 seconds
check_hostnames off
allow_underscore on
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 100
read_ahead_gap 2000 bytes
dns_children 8
hierarchy_stoplist cgi-bin ?
client_db off
strip_query_terms off
via off
reply_header_access Via deny all
reply_header_access Server deny all
#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$ 1440 50% 10080
refresh_pattern -i \.jpeg$ 1440 50% 10080
refresh_pattern -i \.gif$ 1440 50% 10080
refresh_pattern -i \.png$ 1440 50% 10080
refresh_pattern -i \.bmp$ 1440 50% 10080
refresh_pattern -i \.psd$ 1440 50% 10080
refresh_pattern -i \.zip$ 1440 50% 10080
refresh_pattern -i \.rar$ 1440 50% 10080
refresh_pattern -i \.jar$ 1440 50% 10080
refresh_pattern -i \.gz$ 1440 50% 10080
refresh_pattern -i \.avi$ 1440 50% 10080
refresh_pattern -i \.mp3$ 1440 50% 10080
refresh_pattern -i \.mp4$ 1440 50% 10080
refresh_pattern -i \.3gp$ 1440 50% 10080
refresh_pattern -i \.sis$ 1440 50% 10080
refresh_pattern -i \.wml$ 1440 50% 10080
refresh_pattern -i \.umd$ 1440 50% 10080
refresh_pattern -i \.txt$ 1440 50% 10080
refresh_pattern -i \.css$ 1440 50% 4320
refresh_pattern -i \.apk$ 1440 50% 4320
refresh_pattern -i \.js$ 1440 50% 4320
refresh_pattern -i \.xml$ 1440 50% 4320
refresh_pattern -i \.htm$ 60 20% 4320
refresh_pattern -i \.html$ 60 20% 4320
refresh_pattern . 0 20% 4320
cache_dir aufs /www/wdlinux/squid/var/cache 102400000 16 256
maximum_object_size 307200 KB
maximum_object_size_in_memory 2048 KB
cache_mem 2048 MB
cache_swap_low 80
cache_swap_high 90
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
memory_pools on
memory_pools_limit 512 MB