Kamis, Januari 14, 2010

Squid 3.0 On Debian Lenny

There is sample configuration for Squid 3.0

http_port 192.168.1.1:3128 transparent
icp_port 3130
acl youtube dstdomain .youtube.com
no_cache allow youtube
hierarchy_stoplist cgi-bin ? localhost .js .jsp .friendster.com
acl QUERY urlpath_regex cgi-bin \? localhost .friendster.com
no_cache deny QUERY
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_mem 6 MB
cache_dir diskd cache0 12000 28 256
cache_dir diskd cache1 12000 28 256
cache_swap_low 98
cache_swap_high 99
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
mime_table /usr/share/squid/mime.conf
pid_filename /var/run/squid.pid
client_netmask 255.255.255.0
refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod
refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod
redirect_rewrites_host_header off
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localnet src 192.168.1.0/255.255.255.0
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 8443 563 777
acl Safe_ports port 25 80 81 110 443 563 6667 7000 777 210 119 70 21 1025-65535
acl Safe_ports port 280 6668 6669
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777

always_direct deny all
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny CONNECT
#httpd_accel_host virtual
#httpd_accel_port 80
#httpd_accel_with_proxy on
#httpd_accel_uses_host_header on
http_access deny all
maximum_object_size 128 MB
maximum_object_size_in_memory 8 KB
ipcache_size 4096
ipcache_low 98
ipcache_high 99
quick_abort_min 0
quick_abort_max 0
quick_abort_pct 75
fqdncache_size 4096
shutdown_lifetime 10 seconds
cache_mgr squidku@yahoo.com
cache_effective_user proxy
cache_effective_group proxy
memory_pools off
buffered_logs off
log_icp_queries off
logfile_rotate 1
log_fqdn off
forwarded_for off
icp_hit_stale on
query_icmp on
reload_into_ims on
emulate_httpd_log off
negative_ttl 2 minutes
pipeline_prefetch on
vary_ignore_expire on
half_closed_clients off
high_page_fault_warning 2
nonhierarchical_direct on
prefer_direct off
visible_hostname squidku.net.id
unique_hostname squidku.net.id
For more configuration we can modificate the configuration above, beside implemented to Debian this configuration can apply to Ubuntu, Linuxmint and other linux distro.

For more information, just visit squid official site.

0 komentar: