Squid.conf koe

# WELCOME TO SQUID 2.6.STABLE12
# —————————-

# NETWORK OPTIONS
# —————————————————————————–

http_port 8080
http_port 3128

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

acl apache rep_header Server ^Apache
broken_vary_encoding allow apache

maximum_object_size 256 KB

cache_replacement_policy lru
memory_replacement_policy lru

cache_dir diskd /cache/cache1 10000 46 256
cache_dir diskd /cache/cache2 10000 46 256

access_log /cache1/access.log squid
cache_log /cache1/cache.log
mime_table /etc/squid/mime.conf
pid_filename /var/run/squid.pid
cache_store_log none

log_mime_hdrs off

diskd_program /usr/libexec/diskd-daemon

##refresh Pattern ——-
############################################################################
refresh_pattern -i \.gif$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.jpg$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.jpeg$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.png$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.bmp$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.swf$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.co$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.GIF$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.JPG$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.JPEG$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.PNG$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.BMP$ 10080 88% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.avi$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.cab$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.mov$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.mp3$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.mpg$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.mpeg$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.aif$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.ra$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.rm$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.zip$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.rar$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.arj$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.tgz$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.exe$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.rpm$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.ace$ 20160 100% 40320 reload-into-ims override-expire override-lastmod
refresh_pattern -i \.tar\.gz$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.z$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.cue$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.tar\.gz$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.z$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.cue$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.msi$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.wsz$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.js$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.swf$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.txt$ 20160 100% 40320 override-lastmod
refresh_pattern -i \.exe$ 20160 100% 40320 override-lastmod
# —– Refresh Pattern untuk iklan
refresh_pattern -i .*banner.* 20160 100% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i .*ads.* 20160 100% 80640 reload-into-ims override-expire override-lastmod
refresh_pattern -i .*advert.* 20160 100% 43200 override-expire
refresh_pattern -i .*popups.* 20160 100% 43200 override-expire
refresh_pattern -i .*iklan.* 20160 100% 43200 override-expire
refresh_pattern -i .*art.* 20160 100% 43200 override-expire
refresh_pattern -i .*advertising\.com.* 20160 100% 43200 override-expire
refresh_pattern -i ^http://.*\.doubleclick\.net 10080 300% 40320 override-expire override-lastmod override-expire ignore-reload
refresh_pattern -i .*doubleclick\.net.* 20160 100% 43200 override-expire
refresh_pattern -i .*atwola\.com.* 20160 100% 43200 override-expire
refresh_pattern -i .*qksrv\.net.* 20160 100% 43200 override-expire
refresh_pattern -i .*burstnet\.com.* 20160 100% 43200 override-expire
refresh_pattern -i .*ad-images.* 20160 100% 43200 reload-into-ims override-expire override-lastmod
refresh_pattern -i .*yimg\.com/* 20160 100% 43200 override-expire
refresh_pattern -i .*img.* 20160 100% 43200 override-expire
refresh_pattern -i .*images.* 20160 100% 43200 override-expire
refresh_pattern -i .*photo.* 20160 100% 43200 override-expire
refresh_pattern -i .*advertising\.com.* 20160 100% 43200 override-expire
refresh_pattern -i .*static.* 20160 100% 43200 override-expire
refresh_pattern -i .*\.com\.com.* 20160 100% 43200 override-expire
refresh_pattern -i .*akamai\.net.* 10080 100% 20160 override-expire

# —— Refresh Pattern untuk News Sites ———–
refresh_pattern ^http://.*\.cnn\.com 360 50% 4320 override-lastmod override-expire ignore-reload
refresh_pattern ^http://news\.bbc\.co\.uk 360 50% 4320 override-lastmod override-expire ignore-reload
refresh_pattern ^http://.*\.ananova\.com 360 50% 4320 override-lastmod override-expire ignore-reload
refresh_pattern ^http://.*\.reuters\.com 360 50% 4320 override-lastmod override-expire ignore-reload
refresh_pattern ^http://.*\.astaga\.com 360 50% 4320 override-lastmod override-expire ignore-reload
refresh_pattern ^http://.*detik\.com.* 360 50% 4320 override-lastmod override-expire ignore-reload

# Inefficient sites
refresh_pattern microsoft 1080 150% 10080 override-expire override-lastmod override-expire
refresh_pattern msn\.com 4320 150% 10080 override-expire override-lastmod override-expire
refresh_pattern -i .*detik\.com.* 360 100% 10080 override-lastmod

efresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern .jpg 10000 30% 24000
refresh_pattern .png 10000 30% 24000
refresh_pattern . 0 20% 4320

quick_abort_min 16 KB
quick_abort_max 128 KB
quick_abort_pct 85
read_ahead_gap 16 KB
negative_ttl 5 minutes
positive_dns_ttl 6 hours
negative_dns_ttl 1 minute
range_offset_limit 4096 KB

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
acl to_localhost dst 127.0.0.0/8
acl localmachine src xxx.xxx.xxx.0/24
acl localbackup src xxx.xxx.xxx.xxx/29
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 CONNECT method CONNECT
acl post method POST

http_access allow manager localmachine localhost localbackup
http_access deny manager

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

acl ip_client src xxx.xxx.xxx.0/24
http_access allow ip_client

acl ip_backup src xxx.xxx.xxx.xxx/29
http_access allow ip_backup

http_access allow localhost
http_access deny all

http_reply_access allow all

never_direct allow all

cache_effective_user squid
cache_effective_group squid

cache_mgr servas@servas-on.net
visible_hostname proxy.servas-on.net

forwarded_for on
log_icp_queries on
icp_hit_stale off
query_icmp off

coredump_dir /var/spool/squid

client_persistent_connections on
server_persistent_connections on

Ditulis dalam Linux, Proxy. Tag: , . Leave a Comment »

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: