sudone.com 服务器系统架构分析日志


squid2.5经典配置文件

[2010-04-13 11:10:13]
###############################################################################################

visible_hostname cache.sudone.com

#Pattern
refresh_pattern       -i  .htm               1         80%      10      override-expire ignore-reload
refresh_pattern       -i  .html              1         80%      10      override-expire ignore-reload
refresh_pattern       -i  .jsp               1         80%      10      override-expire ignore-reload
refresh_pattern       -i  .swf               360       100%     360     override-expire ignore-reload
refresh_pattern       -i  .flv               360       100%     360     override-expire ignore-reload
refresh_pattern       -i  .wmv               360       100%     360     override-expire ignore-reload
refresh_pattern       -i  .asf               360       100%     360     override-expire ignore-reload
refresh_pattern       -i  .                  1         80%      10      override-expire ignore-reload

http_port 80

acl adminBoxes src 127.0.0.1

cache_access_log /dev/null

maximum_object_size 4 MB
minimum_object_size 1 bytes
maximum_object_size_in_memory 1 MB


cache_dir aufs /data/squid/cache 4096 64 64
cache_mem 1024 MB


acl Host1 dstdomain .sudone.com .abc.com

###############################################################################################

































#base
pid_filename var/logs/squid.pid
#dns_nameservers 127.0.0.1
cache_effective_user squid
cache_effective_group squid
httpd_accel_host virtual
httpd_accel_single_host off
httpd_accel_port 80
httpd_accel_uses_host_header on
httpd_accel_with_proxy on
icp_port 0
strip_query_terms off

#net
negative_ttl 10 seconds
negative_dns_ttl 30 minutes
read_timeout 3 minutes
persistent_request_timeout 60 seconds
pconn_timeout 30 seconds
client_persistent_connections on
server_persistent_connections on
pipeline_prefetch on
half_closed_clients off
shutdown_lifetime 120 seconds

#mem
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_swap_low 85
cache_swap_high 95
memory_pools_limit 50 MB
client_db off

#acl
acl acceleratedProtocol protocol HTTP
acl acceleratedPort port 80
acl all src 0.0.0.0/0.0.0.0
http_access allow acceleratedProtocol acceleratedPort Host1
acl purge method PURGE
http_access allow adminBoxes purge
http_access deny purge
acl manager proto cache_object
http_access allow manager adminBoxes
http_access deny all

#log
emulate_httpd_log on
cache_store_log none

站名:sudone.com; 站长:Ayou; 服务器:ubuntu+nginx+squid+php
老细网