分类: LINUX
2009-09-04 17:04:19
vi /etc/squid/squid.conf
#Begin of squid.conf
http_port 0.0.0.0:80 vhost vport
icp_port 3130
htcp_port 0
udp_incoming_address 0.0.0.0
udp_outgoing_address 255.255.255.255
cache_peer 61.129.102.78 Parent 80 0 no-query originserver
cache_peer_domain 61.129.102.78 our_sites
cache_peer_access our_servers Allow our_sites
cache_peer_access our_servers Deny all
icp_query_timeout 0
maximum_icp_query_timeout 2000
mcast_icp_query_timeout 2000
dead_peer_timeout 10 seconds
hierarchy_stoplist cgi-bin
hierarchy_stoplist ?
cache Deny QUERY
cache_vary on
broken_vary_encoding Allow apache
cache_mem 134217728 bytes
cache_swap_low 80
cache_swap_high 97
maximum_object_size 4194304 bytes
minimum_object_size 0 bytes
maximum_object_size_in_memory 262144 bytes
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
cache_replacement_policy lru
memory_replacement_policy lru
cache_dir ufs /var/spool/squid 100 16 256
access_log none
cache_log none
cache_store_log none
emulate_httpd_log off
log_ip_on_direct on
mime_table /usr/share/squid/mime.conf
log_mime_hdrs off
pid_filename /var/run/squid.pid
debug_options ALL,1
log_fqdn off
client_netmask 255.255.255.255
ftp_user Squid@
ftp_list_width 32
ftp_passive on
ftp_sanitycheck on
ftp_telnet_protocol on
check_hostnames off
allow_underscore on
dns_retransmit_interval 5 seconds
dns_timeout 120 seconds
dns_defnames off
hosts_file /etc/hosts
diskd_program /usr/lib/squid/diskd-daemon
unlinkd_program /usr/lib/squid/unlinkd
url_rewrite_children 5
url_rewrite_concurrency 0
url_rewrite_host_header on
location_rewrite_children 5
location_rewrite_concurrency 0
authenticate_cache_garbage_interval 3600 seconds
authenticate_ttl 3600 seconds
authenticate_ip_ttl 0 seconds
wais_relay_port 0
request_header_max_size 20480 bytes
request_body_max_size 5242880 bytes
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern -i .gif 10 40% 60
ignore-reload
refresh_pattern -i .jpg 10 40% 60
ignore-reload
refresh_pattern -i .htm 0 40% 60
refresh_pattern -i .html 0 40% 60
refresh_pattern -i .css 10 40% 60
ignore-reload
refresh_pattern -i .swf 10 40% 60
ignore-reload
refresh_pattern -i .cur 10 40% 60
ignore-reload
refresh_pattern -i .js$ 10 40% 60
ignore-reload
refresh_pattern . 0 20% 4320
quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95
read_ahead_gap 16384 bytes
negative_ttl 300 seconds
positive_dns_ttl 21600 seconds
negative_dns_ttl 60 seconds
range_offset_limit 0 bytes
collapsed_forwarding off
refresh_stale_hit 0 seconds
forward_timeout 240 seconds
connect_timeout 60 seconds
peer_connect_timeout 30 seconds
read_timeout 900 seconds
request_timeout 300 seconds
persistent_request_timeout 60 seconds
client_lifetime 86400 seconds
half_closed_clients on
pconn_timeout 120 seconds
ident_timeout 10 seconds
shutdown_lifetime 30 seconds
acl QUERY urlpath_regex cgi-bin
acl QUERY urlpath_regex \?
acl apache rep_header Server ^Apache
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1
acl to_localhost dst 127.0.0.0/255.0.0.0
acl to_external dst
acl SSL_ports port 443
acl SSL_ports port 563
acl SSL_ports port 873
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Safe_ports port 631
acl Safe_ports port 873
acl Safe_ports port 901
acl purge method PURGE
acl CONNECT method CONNECT
acl our_sites dstdomain .94200.com
acl our_sites dstdomain .lovebao.com
acl AntiBaidu req_header User-Agent Baiduspider
http_access Allow manager localhost
http_access Deny manager
http_access Allow purge
http_access Allow purge localhost
http_access Deny purge
http_access Deny !Safe_ports
http_access Deny CONNECT !SSL_ports
http_access Deny to_external
http_access Deny AntiBaidu
http_access Allow our_sites
http_access Allow localhost
http_access Deny all
http_reply_access Allow all
icp_access Allow all
htcp_access Deny all
htcp_clr_access Deny all
ident_lookup_access Deny all
reply_header_max_size 20480 bytes
reply_body_max_size 0 Allow all
cache_mgr admin
mail_program mail
cache_effective_user proxy
cache_effective_group proxy
httpd_suppress_version_string off
visible_hostname cdn.94200.com
umask 23
announce_period 31536000 seconds
announce_host tracker.ircache.net
announce_port 3131
httpd_accel_no_pmtu_disc off
dns_testnames netscape.com
dns_testnames internic.net
dns_testnames nlanr.net
dns_testnames microsoft.com
logfile_rotate 0
tcp_recv_bufsize 0 bytes
err_html_text
memory_pools on
memory_pools_limit 52428800 bytes
via on
forwarded_for on
log_icp_queries on
icp_hit_stale off
minimum_direct_hops 4
minimum_direct_rtt 400
cachemgr_passwd XXXXXXXXXX all
store_avg_object_size 13 KB
store_objects_per_bucket 20
client_db on
netdb_low 900
netdb_high 1000
netdb_ping_period 300 seconds
query_icmp off
test_reachability off
buffered_logs off
reload_into_ims off
always_direct Allow all
icon_directory /usr/share/squid/icons
global_internal_static on
short_icon_urls off
error_directory /usr/share/squid/errors/Simplify_Chinese
maximum_single_addr_tries 1
retry_on_error off
snmp_port 0
snmp_access Deny all
snmp_incoming_address 0.0.0.0
snmp_outgoing_address 255.255.255.255
as_whois_server whois.ra.net
wccp_router 0.0.0.0
wccp_version 4
wccp2_rebuild_wait on
wccp2_forwarding_method 1
wccp2_return_method 1
wccp2_assignment_method 1
wccp2_service standard 0wccp2_weight 10000
wccp_address 0.0.0.0
wccp2_address 0.0.0.0
delay_pools 0
delay_initial_bucket_level 50
incoming_icp_average 6
incoming_http_average 4
incoming_dns_average 4
min_icp_poll_cnt 8
min_dns_poll_cnt 8
min_http_poll_cnt 8
max_open_disk_fds 0
offline_mode off
uri_whitespace strip
nonhierarchical_direct on
prefer_direct off
strip_query_terms off
coredump_dir /var/spool/squid
redirector_bypass off
ignore_unknown_nameservers on
digest_generation on
digest_bits_per_entry 5
digest_rebuild_period 3600 seconds
digest_rewrite_period 3600 seconds
digest_swapout_chunk_size 4096 bytes
digest_rebuild_chunk_percentage 10
client_persistent_connections on
server_persistent_connections on
persistent_connection_after_error off
detect_broken_pconn off
balance_on_multiple_ip on
pipeline_prefetch off
request_entities off
high_response_time_warning 0
high_page_fault_warning 0
high_memory_warning 0 bytes
store_dir_select_algorithm least-load
ie_refresh off
vary_ignore_expire off
sleep_after_fork 0
minimum_expiry_time 60 seconds
relaxed_header_parser on
#End of squid.conf