squid安装配置

squid安装配置

Squid做反向代理(192.168.1.69)

squid.conf

 http_port 80 vhost vport
visible_hostname pdd2.matrixcdn.net
cache_mem 32 MB
maximum_object_size 32768 KB
maximum_object_size_in_memory 512 KB
cache_dir coss /data/cache/coss 5000 max-size=131072 block-size=4096 membufs=10
cache_dir coss /data/cache/coss0 5000 max-size=131072 block-size=4096 membufs=10
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
cache_swap_log /var/log/squid/coss.swap.state
logfile_rotate 6
pid_filename /var/run/squid.pid
strip_query_terms off
hosts_file /etc/hosts
acl all src 0.0.0.0/0.0.0.0
broken_vary_encoding allow all
cache_effective_user squid
header_access Via deny all
negative_ttl 1 minutes include /usr/local/squid27/etc/squid1.conf

squid1.conf

 acl manager proto cache_object
acl localhost src 127.0.0.1/32 192.168.1.69/32 acl SSL_ports port 443
acl Safe_ports port 80 # http
#acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 3130 # squid ICP
acl purge method purge acl CONNECT method CONNECT acl domains1 dstdomain "/usr/local/squid27/etc/dstdomain.conf"
acl dynamic_page urlpath_regex \.php \.aspx \.jsp
cache deny dynamic_page
hierarchy_stoplist ? cgi-bin icp_port 3130
cache_peer 192.168.1.155 sibling 80 3130
cache_peer 192.168.1.69 sibling 80 3130
icp_access allow all http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow purge localhost
http_access deny purge
http_access allow domains1
http_access allow localhost
http_access deny all refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320 include /usr/local/squid27/etc/acl.conf

acl.conf

 #------metasequoia---(1)
acl meta_url dstdomain www.metasequoia.cn
cache_peer 114.113.151.226 parent 80 0 no-query no-digest originserver name=pdd
cache_peer_access pdd allow meta_url
cache_peer_access pdd deny all #1------metasequoia---(2)
cache_peer 114.113.151.226 parent 80 0 no-query no-digest originserver name=pdd
cache_peer_domain pdd www.metasequoia.cn
上一篇:java基础(二)-----java的三大特性之继承


下一篇:BZOJ1014 JSOI2008火星人(splay+哈希)