配置文件如下
http_port 59.175.238.60:80 defaultsite=219.140.171.194 vhost vport=80
cache_mem 2048 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 20 MB
maximum_object_size_in_memory 8 MB
cache_dir ufs /squid_cache 100000 128 512
cache_peer 219.140.171.194 parent 80 0 no-query originserver
cache_peer_domain 219.140.171.194 img.cnhubei.com
acl all src 0.0.0.0/0.0.0.0
acl Safe_ports port 80
acl Safe_ports port 443
acl AntiBaidu req_header User-Agent Baiduspider
acl cnhubei referer_regex -i cnhubei
acl nullref referer_regex -i ^$
http_access allow nullref
http_access deny !Safe_ports
http_access deny AntiBaidu
http_access deny !cnhubei
deny_info http://www.cnhubei.com/images/2007cnhubei04y002.jpg cnhubei
http_access allow all
visible_hostname www.w3cool.com
cache_mgr zhangweijie@gmail.com
#### Disable Logs
cache_store_log none
cache_vary on
logfile_rotate 0
refresh_pattern -i \.*$ 1440 90% 129600 reload-into-ims
参数设置的都很暴力,还设置了一个反盗链
文章来源:http://www.w3cool.com/2008/06/24/squid.html