Squid 2.7STABLE on FreeBSD 8_STABLE

Squid compile options:
# squid -v
Squid Cache: Version 2.7.STABLE7
configure options: '--bindir=/usr/local/sbin' '--sbindir=/usr/local/sbin' '--datadir=/usr/local/etc/squid' '--libexecdir=/usr/local/libexec/squid' '--localstatedir=/usr/local/squid' '--sysconfdir=/usr/local/etc/squid' '--enable-removal-policies=lru heap' '--disable-linux-netfilter' '--disable-linux-tproxy' '--disable-epoll' '--enable-auth=basic digest negotiate ntlm' '--enable-basic-auth-helpers=DB NCSA PAM MSNT SMB YP' '--enable-digest-auth-helpers=password' '--enable-external-acl-helpers=ip_user session unix_group wbinfo_group' '--enable-ntlm-auth-helpers=SMB' '--with-pthreads' '--enable-storeio=ufs diskd null aufs' '--enable-delay-pools' '--enable-snmp' '--disable-internal-dns' '--enable-referer-log' '--enable-useragent-log' '--enable-pf-transparent' '--disable-kqueue' '--with-large-files' '--enable-large-cache-files' '--enable-err-languages=Armenian Azerbaijani Bulgarian Catalan Czech Danish Dutch English Estonian Finnish French German Greek Hebrew Hungarian Italian Japanese Korean Lithuanian Polish Portuguese Romanian Russian-1251 Russian-koi8-r Serbian Simplify_Chinese Slovak Spanish Swedish Traditional_Chinese Turkish Ukrainian-1251 Ukrainian-koi8-u Ukrainian-utf8' '--enable-default-err-language=English' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.0' 'build_alias=i386-portbld-freebsd8.0' 'CC=cc' 'CFLAGS=-O2 -fno-strict-aliasing -pipe -march=pentium4 -mtune=pentium4 -march=pentium4 ' 'LDFLAGS=' 'CPPFLAGS='

squid.conf:
http_port 3128 transparent
snmp_port 3401
snmp_incoming_address 0.0.0.0
snmp_outgoing_address 255.255.255.255
visible_hostname proxy.domainname.ru

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.0/255.255.255.255
acl localhost src 127.0.0.1
acl ssl_ports port 443 563 873
acl safe_ports port 80 21 70 210 1025-65535 280

acl manager proto cache_object
acl purge method PURGE
acl CONNECT method CONNECT

acl nobanners url_regex "/usr/local/etc/squid/acl/inet_nobanners.acl"
acl banners url_regex "/usr/local/etc/squid/acl/inet_banners.acl"

http_access allow localhost
http_access allow all localhost
http_access allow manager localhost
http_access allow purge localhost

acl servers src 10.0.1.0/24
acl users   src 10.20.5.0/24

http_access allow servers
http_access allow users !banners
http_access allow nobanners
http_access deny !servers
http_access deny !users

acl hostname src 10.0.1.3/255.255.255.255
acl snmpacl snmp_community define_snmpcommunity
snmp_access allow snmpacl localhost
snmp_access allow snmpacl hostname
snmp_access deny all
high_memory_warning 128 MB

cache_mem 32 MB
memory_pools off
memory_pools_limit 16 MB

cache_swap_low 90
cache_swap_high 99
maximum_object_size 16364 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 128 KB

ipcache_size 4096
ipcache_low 94
ipcache_high 99
fqdncache_size 8192
icp_port 0

cache_dir ufs /usr/local/squid/cache 5000 16 128
access_log /usr/local/squid/logs/access.log squid
cache_log /usr/local/squid/logs/cache.log
cache_store_log none
#emulate_httpd_log off

quick_abort_min 0 KB
quick_abort_max 0 KB
negative_ttl 1 minutes
dns_children 6
positive_dns_ttl 6 hours
negative_dns_ttl 1 minutes
range_offset_limit 0
request_header_max_size 250 KB
request_body_max_size 0 KB
request_entities on
collapsed_forwarding on

#cache_replacement_policy heap GDSF
#memory_replacement_policy heap GDSF

refresh_pattern ^ftp: 129600 100% 129600
refresh_pattern ^gopher: 129600 100% 129600
refresh_pattern . 0 20% 4320
refresh_pattern .*.deb$ 129600 100% 129600 reload-into-ims
refresh_pattern -i \Packages.*$ 1 100 129600 reload-into-ims
refresh_pattern .*.tar.bz2$ 129600 100% 129600 reload-into-ims
refresh_pattern -i \.gif$ 129600 100% 129600 reload-into-ims
refresh_pattern -i \.png$ 129600 100% 129600 reload-into-ims
refresh_pattern -i \.jpg$ 129600 100% 129600 reload-into-ims
refresh_pattern -i \.jpeg$ 129600 100% 129600 reload-into-ims
refresh_pattern -i \.swf$ 129600 100% 129600 reload-into-ims
refresh_pattern -i \.bmp$ 129600 100% 129600 reload-into-ims

#connect_timeout 60 seconds
#siteselect_timeout 8 seconds
read_timeout 2 minutes

#request_timeout 60 seconds
#client_lifetime 12 hours
#half_closed_clients off
#pconn_timeout 120 seconds
#ident_timeout 0 seconds
shutdown_lifetime 1 seconds

#high_response_time_warning 50
#high_page_fault_warning 2
forwarded_for off

cache_mgr manager@domainname.ru
coredump_dir /usr/local/squid
http_reply_access allow all

icp_access deny all
http_access deny all
http_access deny manager
http_access deny !safe_ports
http_access deny CONNECT !ssl_ports

No comments:

Post a Comment