#==========================================================
#konfigurasi squid.conf yg aku pakai dan alhmldh berjalan dengan baik langsung aku #documentasikan disini biar laen kali klu perlu tinggal copas
#==========================================================
http_port 3128 transparent
icp_port 3130
snmp_port 3401
acl QUERY urlpath_regex cgi-bin \? \.php$ \.asp$ \.shtml$ \.cfm$ \.cfml$ \.phtml$ \.php3$ \.js \.jsp
acl nocache-domain dstdomain server.nasrulkurniawan.net uns.ac.id siakad.uns.ac.id
always_direct allow QUERY
always_direct allow nocache-domain
no_cache deny QUERY
no_cache deny nocache-domain
cache_mem 128 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 128 MB
maximum_object_size_in_memory 32 KB
#tambah tambahan
ipcache_size 4096
ipcache_low 98
ipcache_high 99
fqdncache_size 1024
cache_replacement_policy heap LFUDA
#cache_replacement_policy heap GDSF
memory_replacement_policy heap GDSF
#high_memory_warning 120 MB
acl mp3 urlpath_regex \.mp3$
acl exe urlpath_regex \.exe$
acl zip urlpath_regex \.zip$
acl dat urlpath_regex \.dat$
acl avi urlpath_regex \.avi$
acl 3gp urlpath_regex \.3gp$
#data mp2, exe, zip, dat, avi, 3gp tidak disimpan di cache hardisk
no_cache deny mp3
no_cache deny exe
no_cache deny zip
no_cache deny dat
no_cache deny avi
no_cache deny 3gp
cache_dir coss /cache0/cache-coss/coss1 2000 block-size=512 max-size=131072
#cache_dir coss /cache0/squid-coss/coss2 2000 block-size=512 max-size=131072
#cache_dir coss /cache0/squid-coss/coss3 2000 block-size=512 max-size=131072
#cache_dir coss /cache0/squid-coss/coss4 2000 block-size=512 max-size=131072
cache_dir coss /cache1/cache-coss/coss1 2000 block-size=512 max-size=131072
#cache_dir coss /cache1/squid-coss/coss2 2000 block-size=512 max-size=131072
#cache_dir coss /cache1/squid-coss/coss3 2000 block-size=512 max-size=131072
#cache_dir coss /cache1/squid-coss/coss4 2000 block-size=512 max-size=131072
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
cache_swap_log /usr/local/squid/var/logs/%s
#cache_dir diskd /cache0 8000 16 256 Q1=72 Q2=64
#cache_dir diskd /cache1 8000 16 256 Q1=72 Q2=64
#cache_dir aufs /cache0/aufs 6000 16 128
#cache_dir aufs /cache1/aufs 6000 16 128
#cache_access_log /usr/local/squid/var/logs/access.log
#cache_log /usr/local/squid/var/logs/cache.log
#cache_store_log none
acl all src 0.0.0.0/0.0.0.0
acl lan_bagong src 192.168.0.0/24
acl private src 125.163.210.0/24
acl jnp src 222.124.162.0/24
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl manager proto cache_object
#port yang diijinkan untuk di request
acl SSL_ports port 443 563
acl SSL_ports port 2083 2096
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
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 631 # cups
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl FTP proto FTP
http_access allow lan_bagong
http_access allow private
http_access allow jnp
http_access allow localhost
http_access deny all
miss_access allow all
miss_access allow lan_bagong
always_direct allow lan_bagong
always_direct allow FTP
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
icp_access allow lan_bagong
icp_access allow private
icp_access allow localhost
icp_access deny all
acl cachemgr proto cache_object
http_access allow cachemgr lan_bagong
http_access allow cachemgr private
http_access allow cachemgr localhost
http_access deny cachemgr all
cachemgr_passwd admin info stats/objects
cachemgr_passwd admin all
cache_effective_user squid
cache_effective_group squid
visible_hostname http://cache.bagong.net
cache_mgr NOC-BagongNET
forwarded_for off
#refresh
refresh_pattern -i \.tar.gz$ 10080 90% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.mp3$ 10080 90% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.png$ 10080 90% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.gif$ 10080 90% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.jpg$ 10080 90% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.jpeg$ 10080 90% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(mov|avi|qtm|mp?)$ 21600 90% 43200
refresh_pattern -i \.(3gp|wmv|wma|mpg|mpeg|mpga|rm|rv|vgp)$ 21600 90% 43200
#refresh_pattern -i \.(zip|exe|gz|Z|lha||rar|arj)$ 21600 90% 43200
#refresh_pattern -i \.(hqx|pdf|rtf|doc|swf)$ 100000 500% 99000000
#refresh_pattern -i \.(inc|cab|ad|txt|)$ 100000 500% 99000000
refresh_pattern ^http://photos.friendster.com/.* 720 100% 4320
refresh_pattern ^http://images.friendster.com/.* 720 100% 4320
refresh_pattern ^http://mail.yahoo.com/.* 720 100% 4320
refresh_pattern ^http://mail1.plasa.com/.* 720 100% 4320
refresh_pattern ^http://*.yahoo.*/.* 720 100% 4320
refresh_pattern ^http://*.google.*/.* 720 100% 4320
refresh_pattern ^http://*.friendster.*/.* 720 100% 4320
refresh_pattern ^http://*.doubleclick.*/.* 720 100% 4320
refresh_pattern ^http://www.yahoo.com/.* 720 100% 4320
refresh_pattern ^http://*.yimg.*/.* 720 100% 4320
refresh_pattern ^http://*.boleh.*/.* 720 100% 4320
refresh_pattern ^http://*.detik.*/.* 180 100% 4320
refresh_pattern ^http://*.detikinet.*/.* 180 100% 4320
refresh_pattern ^http://*.detikhot.*/.* 180 100% 4320
refresh_pattern ^http://*.detiportal.*/.* 180 100% 4320
refresh_pattern ^http://*.kompas.*/.* 180 100% 4320
refresh_pattern ^http://*.trans7.*/.* 720 100% 4320
refresh_pattern ^http://*.rcti.*/.* 720 100% 4320
refresh_pattern ^http://*.indosiar.*/.* 720 100% 4320
refresh_pattern ^http://*.kapanlagi.*/.* 720 100% 4320
refresh_pattern ^http://*.doubleclick.*/.* 720 100% 4320
refresh_pattern ^http://*.google-analytics.*/.* 720 100% 4320
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern . 0 20% 4320
# Penting untuk meningkatkan refresh Pattern
reload_into_ims on
pipeline_prefetch on
vary_ignore_expire on
quick_abort_min 12 KB
quick_abort_max 12 KB
quick_abort_pct 98
negative_ttl 1 minutes
positive_dns_ttl 60 seconds
negative_dns_ttl 30 seconds
store_avg_object_size 13 KB
store_objects_per_bucket 20
#TIMEOUTS
read_timeout 5 minutes
request_timeout 1 minutes
client_lifetime 360 minutes
half_closed_clients off
shutdown_lifetime 2 seconds
#youtube
#redirect_program /usr/local/squidguard/bin/squidGuard
#url_rewrite_program /usr/local/bin/python
#url_rewrite_children 10
#acl videocache_allow_url url_regex -i \.youtube\.com\/get_video\?
#acl videocache_allow_url url_regex -i \.googlevideo\.com\/videoplayback \.googlevideo\.com\/videoplay \.googlevideo\.com\/get_video\?
#acl videocache_allow_url url_regex -i \.google\.com\/videoplayback \.google\.com\/videoplay \.google\.com\/get_video\?
#acl videocache_allow_url url_regex -i \.google\.[a-z][a-z]\/videoplayback \.google\.[a-z][a-z]\/videoplay \.google\.[a-z][a-z]\/get_video\?
#acl videocache_allow_url url_regex -i(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/videoplayback\?
#acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/videoplay\?
#acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/get_video\?
#acl videocache_allow_url url_regex -i proxy[a-z0-9\-][a-z0-9][a-z0-9][a-z0-9]?\.dailymotion\.com\/
#acl videocache_allow_url url_regex -i vid\.akm\.dailymotion\.com\/
#acl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?\.xtube\.com\/(.*)flv
#acl videocache_allow_url url_regex -i bitcast\.vimeo\.com\/vimeo\/videos\/
#acl videocache_allow_url url_regex -i va\.wrzuta\.pl\/wa[0-9][0-9][0-9][0-9]?
#acl videocache_allow_url url_regex -i \.files\.youporn\.com\/(.*)\/flv\/
#acl videocache_allow_url url_regex -i \.msn\.com\.edgesuite\.net\/(.*)\.flv
#acl videocache_allow_url url_regex -i media[a-z0-9]?[a-z0-9]?[a-z0-9]?\.tube8\.com\/ mobile[a-z0-9]?[a-z0-9]?[a-z0-9]?\.tube8\.com\/
#acl videocache_allow_url url_regex -i \.mais\.uol\.com\.br\/(.*)\.flv
#acl videocache_allow_url url_regex -i \.video[a-z0-9]?[a-z0-9]?\.blip\.tv\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram)
#acl videocache_allow_url url_regex -i video\.break\.com\/(.*)\.(flv|mp4)
#acl videocache_allow_dom dstdomain .mccont.com dl.redtube.com .cdn.dailymotion.com
#acl videocache_deny_url url_regex -i http:\/\/[a-z][a-z]\.youtube\.com http:\/\/www\.youtube\.com
#url_rewrite_access deny videocache_deny_url
#url_rewrite_access allow videocache_allow_url
#url_rewrite_access allow videocache_allow_dom
#redirector_bypass on
squid coss freebsd 7.1 bagian 2
nakuragen, 30.8.09
Subscribe to:
Post Comments (Atom)


Comments :
Post a Comment