[导入]Freebsd 7.0 下用squid做多台Web加速代理
继上次写的
Freebsd 7.0 下用squid做本地Web加速代理
这次写下Freebsd 7.0 下用squid做多台Web加速代理
freebsd安装配置不说了 可以参考上一篇
直接给出我的squid.conf 文件
Tags - freebsd , squid , 代理 , 加速
文章来源:http://www.askwan.com/read.php?56
Freebsd 7.0 下用squid做本地Web加速代理
这次写下Freebsd 7.0 下用squid做多台Web加速代理
freebsd安装配置不说了 可以参考上一篇
直接给出我的squid.conf 文件
http_port 192.168.0.14:80 vhost vport
hierarchy_stoplist cgi-bin ?
hierarchy_stoplist -i ^https:\\ ?
acl QUERY urlpath_regex cgi-bin \?
acl denyssl urlpath_regex -i ^https:\\
no_cache deny QUERY
no_cache deny denyssl
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
collapsed_forwarding on
cache_mem 384 MB
cache_swap_low 85
cache_swap_high 95
maximum_object_size 10 MB
maximum_object_size_in_memory 8192 KB
ipcache_size 4096
ipcache_low 90
ipcache_high 95
fqdncache_size 4096
cache_replacement_policy lru
memory_replacement_policy lru
cache_dir ufs /disk01/cache1 4096 16 256
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
cache_store_log /usr/local/squid/var/logs/store.log
pid_filename /usr/local/squid/var/logs/squid.pid
forward_timeout 20 seconds
connect_timeout 15 seconds
read_timeout 3 minutes
request_timeout 1 minutes
persistent_request_timeout 15 seconds
client_lifetime 15 minutes
half_closed_clients off
shutdown_lifetime 5 seconds
visible_hostname cache.askwan.com
cache_mgr askwan@askwan.com
visible_hostname Askwan-Squid-Cache-Server
cache_effective_user squid
cache_effective_group squid
logfile_rotate 0
client_persistent_connections off
server_persistent_connections on
vary_ignore_expire on
strip_query_terms on
acl OverConnLimit maxconn 10
http_access deny OverConnLimit
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255 192.168.0.0/24
acl Srvip dst 192.168.0.14/32 202.108.22.43/32 64.233.189.104/32 209.131.36.158/32
acl Srvdm dstdomain .askwan.com baidu.com .yahoo.com .google.com
acl to_localhost dst 127.0.0.0/8 192.168.0.14/32
acl purgehost src 127.0.0.0/8 192.168.0.14/32
acl purgemethod method PURGE
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_ports port 81
acl CONNECT method CONNECT
always_direct allow Srvdm
never_direct allow !Srvdm
http_access allow manager localhost
http_access deny manager
http_access allow purgemethod purgehost
http_access deny !Safe_ports
http_access deny CONNECT all
http_access allow localhost
http_access allow Srvip
http_access allow Srvdm
http_access deny all
http_reply_access allow all
icp_access deny all
icp_port 0
hierarchy_stoplist cgi-bin ?
hierarchy_stoplist -i ^https:\\ ?
acl QUERY urlpath_regex cgi-bin \?
acl denyssl urlpath_regex -i ^https:\\
no_cache deny QUERY
no_cache deny denyssl
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
collapsed_forwarding on
cache_mem 384 MB
cache_swap_low 85
cache_swap_high 95
maximum_object_size 10 MB
maximum_object_size_in_memory 8192 KB
ipcache_size 4096
ipcache_low 90
ipcache_high 95
fqdncache_size 4096
cache_replacement_policy lru
memory_replacement_policy lru
cache_dir ufs /disk01/cache1 4096 16 256
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
cache_store_log /usr/local/squid/var/logs/store.log
pid_filename /usr/local/squid/var/logs/squid.pid
forward_timeout 20 seconds
connect_timeout 15 seconds
read_timeout 3 minutes
request_timeout 1 minutes
persistent_request_timeout 15 seconds
client_lifetime 15 minutes
half_closed_clients off
shutdown_lifetime 5 seconds
visible_hostname cache.askwan.com
cache_mgr askwan@askwan.com
visible_hostname Askwan-Squid-Cache-Server
cache_effective_user squid
cache_effective_group squid
logfile_rotate 0
client_persistent_connections off
server_persistent_connections on
vary_ignore_expire on
strip_query_terms on
acl OverConnLimit maxconn 10
http_access deny OverConnLimit
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255 192.168.0.0/24
acl Srvip dst 192.168.0.14/32 202.108.22.43/32 64.233.189.104/32 209.131.36.158/32
acl Srvdm dstdomain .askwan.com baidu.com .yahoo.com .google.com
acl to_localhost dst 127.0.0.0/8 192.168.0.14/32
acl purgehost src 127.0.0.0/8 192.168.0.14/32
acl purgemethod method PURGE
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_ports port 81
acl CONNECT method CONNECT
always_direct allow Srvdm
never_direct allow !Srvdm
http_access allow manager localhost
http_access deny manager
http_access allow purgemethod purgehost
http_access deny !Safe_ports
http_access deny CONNECT all
http_access allow localhost
http_access allow Srvip
http_access allow Srvdm
http_access deny all
http_reply_access allow all
icp_access deny all
icp_port 0
Tags - freebsd , squid , 代理 , 加速
文章来源:http://www.askwan.com/read.php?56