0% found this document useful (0 votes)
48 views3 pages

Contoh Donf Squid Sederhana

This document contains configuration settings for Squid, an open source proxy server and web cache. It defines access controls, network options, memory and disk cache options, logging, tuning parameters, administrative settings, and other miscellaneous configuration parameters for Squid.

Uploaded by

Tuyul ICO
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views3 pages

Contoh Donf Squid Sederhana

This document contains configuration settings for Squid, an open source proxy server and web cache. It defines access controls, network options, memory and disk cache options, logging, tuning parameters, administrative settings, and other miscellaneous configuration parameters for Squid.

Uploaded by

Tuyul ICO
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

CONTOH. SQUID.

CONF sederhana bagi yang butuh

# ACCESS CONTROLS
# -----------------------------------------------------------------------------
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 Safe_ports port 21 70 80 210 280 443 488 563 591 631 777 901 81 3128 1025-65535
acl SSL_ports port 443 563 81
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all

# NETWORK OPTIONS
# -----------------------------------------------------------------------------
http_port 3128 transparent
zph_mode tos
zph_local 0x30
zph_parent 0
zph_option 136
cache_effective_user proxy
cache_effective_group proxy

# MEMORY CACHE OPTIONS


# -----------------------------------------------------------------------------
cache_mem 8 MB
maximum_object_size_in_memory 32 KB
memory_replacement_policy heap GDSF

# DISK CACHE OPTIONS


# -----------------------------------------------------------------------------
cache_replacement_policy heap LFUDA
cache_dir aufs /cache 20000 18 256
minimum_object_size 512 bytes
maximum_object_size 200000 KB
cache_swap_low 90
cache_swap_high 95

# LOGFILE OPTIONS
# -----------------------------------------------------------------------------
error_directory /usr/share/lusca/errors/English
icon_directory /usr/share/lusca/icons
pid_filename /var/run/squid.pid
mime_table /etc/squid/mime.conf
access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
logfile_rotate 1

# OPTIONS FOR TUNING THE CACHE


# -----------------------------------------------------------------------------
acl cache_allow_dom dstdomain .youtube.com .googlevideo.com .4shared.com
.speedtest.net
storeurl_access allow cache_allow_dom
storeurl_access deny all
storeurl_rewrite_program /etc/squid/storeurl.pl
storeurl_rewrite_children 7
storeurl_rewrite_concurrency 15

# REFRESH THE CACHE


refresh_pattern ^.*safebrowsing.*google 43200 999999% 43200 override-expire ignore-
reload ignore-no-cache ignore-private ignore-auth ignore-must-revalidate negative-
ttl=10080 store-stale
refresh_pattern ytimg\.com.*\.jpg 43200 999999% 43200 override-expire ignore-reload
store-stale
refresh_pattern ^https:\/\/ptop.only.wip.la:443\/http\/images|pics|thumbs[0-9]\. 43200 999999% 43200 reload-
into-ims ignore-no-cache ignore-no-store ignore-reload override-expire store-stale
refresh_pattern -i \.facebook.com.*\.(jpg|gif|png) 129600 999999% 129600 ignore-
reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern -i \.fbcdn.net.*\.(jpg|gif|png|swf|mp3) 129600 999999% 129600
ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern static\.ak\.fbcdn\.net*\.(jpg|gif|png) 129600 999999% 129600
ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^https:\/\/ptop.only.wip.la:443\/http\/profile\.ak\.fbcdn.net*\.(jpg|gif|png) 129600 999999%
129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern ^https:\/\/ptop.only.wip.la:443\/http\/apps.facebook.com.*\/ 10080 999999% 43200 ignore-reload
override-expire ignore-no-cache ignore-no-store store-stale
refresh_pattern speedtest\. 259200 80% 259200 override-expire reload-into-ims
stale-while-revalidate=2592000 ignore-private ignore-no-cache negative-ttl=0
refresh_pattern .zynga.com.*\.(swf|jpg|gif|png|mp3) 129600 999999% 129600 override-
expire ignore-reload store-stale
refresh_pattern \.(jp(e?g|e|2)|tiff?|bmp|gif|png)($|&) 43200 99999% 43200 override-
expire ignore-no-cache ignore-no-store reload-into-ims ignore-private store-stale
refresh_pattern \.(z(ip|[0-9]{2})|r(ar|[0-9]{2})|jar|bz2|gz|tar|rpm|vpu) 43200
99999% 43200 override-expire reload-into-ims store-stale ignore-must-revalidate
refresh_pattern \.(mp3|wav|og(g|a)|flac|midi?|rm|aac|wma|mka|ape) 43200 99999%
43200 override-expire reload-into-ims ignore-reload ignore-must-revalidate store-
stale
refresh_pattern \.(kom|pak|stg|nzp|iop|exe|msi|dmg|bin|xpi|iso|swf |mar|psf|cab)
43200 99999% 43200 override-expire reload-into-ims ignore-no-cache ignore-must-
revalidate
refresh_pattern \.(mpeg|ra?m|avi|mp(g|e|4)|mov|divx|asf|wmv|m\dv|r v|vob|asx|ogm|
flv|3gp|on2) 43200 99999% 43200 override-expire reload-into-ims ignore-must-
revalidate ignore-private ignore-no-store store-stale
refresh_pattern ^ftp: 10080 95% 43200 override-lastmod reload-into-ims store-stale
refresh_pattern -i (cgi-bin|Loder|login|sources) 0 0% 0
refresh_pattern \.(php|jsp|cgi|asx|js|jsp)\? 0 0% 0
refresh_pattern . 0 50% 4320 override-lastmod reload-into-ims store-stale

# HTTP OPTIONS
# -----------------------------------------------------------------------------
quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 98
range_offset_limit 128 KB
store_avg_object_size 13 KB
negative_ttl 0 second
positive_dns_ttl 12 hour
negative_dns_ttl 1 minute
vary_ignore_expire on
server_http11 on
half_closed_clients off
shutdown_lifetime 5 seconds

# ADMINISTRATIVE PARAMETERS
# -----------------------------------------------------------------------------
cache_mgr webmaster
visible_hostname yohanexz.com

# ICP OPTIONS
# -----------------------------------------------------------------------------
icp_port 0
log_icp_queries off
client_db on
buffered_logs on
log_fqdn off
icp_hit_stale on
query_icmp on
retry_on_error off

# DNS OPTIONS
# ---------------------------------------------------------------------------
dns_nameservers 8.8.8.8
dns_nameservers 8.8.4.4
ipcache_size 16384
ipcache_low 90
ipcache_high 95
fqdncache_size 16384

# MISCELLANEOUS
# ----------------------------------------------------------------------------
memory_pools off
forwarded_for on
reload_into_ims on
offline_mode off
coredump_dir /var/spool/squid
pipeline_prefetch on

You might also like