当前位置: > Linux服务器 > 服务器设置 >

squid-cdn配置

时间:2014-12-11 23:56来源:linux.it.net.cn 作者:IT

# squid conf etc/squid.conf
# Created by http://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

 

(责任编辑:IT)
------分隔线----------------------------