我的Squid配置
Squid做反向代理(192.168.1.69)
squid.conf
1 http_port 80 vhost vport
2 visible_hostname pdd2.matrixcdn.net
3 cache_mem 32 MB
4 maximum_object_size 32768 KB
5 maximum_object_size_in_memory 512 KB
6 cache_dir coss /data/cache/coss 5000 max-size=131072 block-size=4096 membufs=10
7 cache_dir coss /data/cache/coss0 5000 max-size=131072 block-size=4096 membufs=10
8 access_log /var/log/squid/access.log
9 cache_log /var/log/squid/cache.log
10 cache_store_log /var/log/squid/store.log
11 cache_swap_log /var/log/squid/coss.swap.state
12 logfile_rotate 6
13 pid_filename /var/run/squid.pid
14 strip_query_terms off
15 hosts_file /etc/hosts
16 acl all src 0.0.0.0/0.0.0.0
17 broken_vary_encoding allow all
18 cache_effective_user squid
19 header_access Via deny all
20 negative_ttl 1 minutes
21
22 include /usr/local/squid27/etc/squid1.conf
squid1.conf
1 acl manager proto cache_object
2 acl localhost src 127.0.0.1/32 192.168.1.69/32
3
4 acl SSL_ports port 443
5 acl Safe_ports port 80 # http
6 #acl Safe_ports port 21 # ftp
7 acl Safe_ports port 443 # https
8 acl Safe_ports port 70 # gopher
9 acl Safe_ports port 210 # wais
10 acl Safe_ports port 1025-65535# unregistered ports
11 acl Safe_ports port 280 # http-mgmt
12 acl Safe_ports port 488 # gss-http
13 acl Safe_ports port 591 # filemaker
14 acl Safe_ports port 777 # multiling http
15 acl Safe_ports port 3130 # squid ICP
16 acl purge method purge
17
18 acl CONNECT method CONNECT
19
20 acl domains1 dstdomain "/usr/local/squid27/etc/dstdomain.conf"
21 acl dynamic_page urlpath_regex \.php \.aspx \.jsp
22 cache deny dynamic_page
23 hierarchy_stoplist ? cgi-bin
24
25 icp_port 3130
26 cache_peer 192.168.1.155 sibling 80 3130
27 cache_peer 192.168.1.69 sibling 80 3130
28 icp_access allow all
29
30 http_access allow manager localhost
31 http_access deny manager
32 http_access deny !Safe_ports
33 http_access deny CONNECT !SSL_ports
34 http_access allow purge localhost
35 http_access deny purge
36 http_access allow domains1
37 http_access allow localhost
38 http_access deny all
39
40 refresh_pattern ^ftp: 1440 20% 10080
41 refresh_pattern ^gopher: 1440 0% 1440
42 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
43 refresh_pattern . 0 20% 4320
44
45 include /usr/local/squid27/etc/acl.conf
acl.conf
1 #------metasequoia---(1)
2 acl meta_url dstdomain www.metasequoia.cn
3 cache_peer 114.113.151.226 parent 80 0 no-query no-digest originserver name=pdd
4 cache_peer_access pdd allow meta_url
5 cache_peer_access pdd deny all
6
7 #1------metasequoia---(2)
8 cache_peer 114.113.151.226 parent 80 0 no-query no-digest originserver name=pdd
9 cache_peer_domain pdd www.metasequoia.cn
页:
[1]