help..squid hit lemah

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
Th4r3n
Posts: 11
Joined: 04 Jun 2010, 16:24

help..squid hit lemah

Postby Th4r3n » 24 Jun 2010, 01:43

tolong para master saya pake p4 2.4 ghz ram 512 hdd 40 gb

hdd di bagi :

7 gb buat system ext4
10 gb buat cache squid proxy1 reiFS
10 gb buat cache squid proxy2 reiFS
10 gb buat cache squid proxy3 reiFS
1 gb buat swap

dah running 3 hari hit nya cuma 32.38 %

tolong di cross check squid conf :

#==================================$
# Proxy Server Versi 2.7.Stable3
# by eyditharen@yahoo.com
#==================================$
#################################################################
# Port
#################################################################
http_port 3128 transparent
icp_port 3130
prefer_direct off
#################################################################
# Cache & Object
#################################################################
cache_mem 16 MB
cache_swap_low 98
cache_swap_high 99
max_filedesc 8192
maximum_object_size 102400 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 64 KB
ipcache_size 4096
ipcache_low 98
ipcache_high 99
fqdncache_size 4096
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
#################################################################
# cache_dir
cache_dir aufs /home/proxy1 9000 32 128
cache_dir aufs /home/proxy2 9000 32 128
cache_dir aufs /home/proxy3 9000 32 128
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
pid_filename /var/run/squid.pid
cache_swap_log /var/log/squid/swap.state
dns_nameservers /etc/resolv.conf
emulate_httpd_log off
hosts_file /etc/hosts
half_closed_clients off
negative_ttl 1 minutes
#################################################################
# Rules: Safe Port
#################################################################
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 SSL_ports port 443 563 873 # https snews rsync
acl Safe_ports port 80 # http
acl Safe_ports port 20 21 # ftp
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 631 # cups
acl Safe_ports port 10000 # webmin
acl Safe_ports port 901 # SWAT
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 Safe_ports port 873 # rsync
acl Safe_ports port 110 # POP3
acl Safe_ports port 25 # SMTP
acl Safe_ports port 2095 2096 # webmail from cpanel
acl Safe_ports port 2082 2083 # cpanel
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 !SSL_ports
http_access deny CONNECT !SSL_ports !Safe_ports
#################################################################
# Refresh Pattern
#################################################################
refresh_pattern ^http\:\/\/*\.facebook\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/.*\.windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/office\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w?xpsp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w2ksp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.macromedia\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^ftp\:\/\/ftp\.nai\.com/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/ftp\.software\.ibm\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.friendster\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.detik\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims

refresh_pattern ^http://*.apps.facebook.*/.* 720 80% 4320
refresh_pattern ^http://*.profile.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.creative.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.static.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.facebook.poker.zynga.com/.* 720 80% 4320
refresh_pattern ^http://*.statics.poker.static.zynga.com/.* 720 80% 4320
refresh_pattern ^http://*.zynga.*/.* 720 80% 4320
refresh_pattern ^http://*.texas_holdem.*/.* 720 80% 4320
refresh_pattern ^http://*.google.*/.* 720 80% 4320
refresh_pattern ^http://*.indowebster.*/.* 720 80% 4320
refresh_pattern ^http://*.4shared.*/.* 720 80% 4320
refresh_pattern ^http://*.yahoo.com/.* 720 80% 4320
refresh_pattern ^http://*.yimg.*/.* 720 80% 4320
refresh_pattern ^http://*.plasa.com/.* 720 80% 4320
refresh_pattern ^http://*.boleh.*/.* 720 80% 4320
refresh_pattern ^http://*.detik.*/.* 180 80% 4320
refresh_pattern ^http://*.detikinet.*/.* 180 80% 4320
refresh_pattern ^http://*.detikhot.*/.* 180 80% 4320
refresh_pattern ^http://*.detiportal.*/.* 180 80% 4320
refresh_pattern ^http://*.kompas.*/.* 180 80% 4320
refresh_pattern ^http://*.kapanlagi.*/.* 720 80% 4320
refresh_pattern ^http://*.google-analytics.*/.* 720 80% 4320

refresh_pattern ^http://(.*?)/get_video\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 999999 override-expire ignore-no-cache ignore-private
refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 161280 50000% 525948 override-expire ignore-reload

# compressed
refresh_pattern -i \.gz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.cab$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.bzip2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.bz2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.gz2$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.tgz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.tar.gz$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.zip$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rar$ 1008000 90% 99999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.tar$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.ace$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.7z$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# documents
refresh_pattern -i \.xls$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.doc$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.xlsx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.docx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.pdf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.ppt$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.pptx$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rtf\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# multimedia
refresh_pattern -i \.mid$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.wav$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.viv$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mpg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mov$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.avi$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.asf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.qt$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rmvb$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mpeg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.wmp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.3gp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mp3$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mp4$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# web content
refresh_pattern -i \.js$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.psf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.html$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.htm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.css$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.swf$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.js\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.css\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.xml$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# images
refresh_pattern -i \.gif$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.jpg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.png$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.jpeg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.bmp$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.psd$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.ad$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.gif\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.jpg\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.png\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.jpeg\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.psd\?$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# application
refresh_pattern -i \.deb$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.rpm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.msi$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.exe$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.dmg$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# misc
refresh_pattern -i \.dat$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.qtm$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

# itunes
refresh_pattern -i \.m4p$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.mpa$ 10080 90% 999999 override-expire override-lastmod reload-into-ims ignore-reload

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(avi|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|css|js|axd)$ 10080 95% 302400 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth
refresh_pattern -i \.(gif|png|jp?g|ico|bmp)$ 4320 95% 10080 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-private ignore-auth
refresh_pattern -i \.(rpm|cab|exe|msi|msu|zip|tar|gz|tgz|rar|bin|7z|doc|xls|ppt|pdf)$ 4320 90% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 360 90% 302400 override-lastmod reload-into-ims

#################################################################
# HAVP + Clamav
#################################################################
cache_peer 127.0.0.1 parent 8080 0 no-query no-digest no-netdb-exchange default
#################################################################
# HIERARCHY (BYPASS CGI)
#################################################################
#hierarchy_stoplist cgi-bin ? .js .jsp
#acl QUERY urlpath_regex cgi-bin \? .js .jsp
#no_cache deny QUERY
#################################################################
# SNMP
#################################################################
snmp_port 3401
acl snmpsquid snmp_community public
snmp_access allow snmpsquid localhost
snmp_access deny all
#################################################################
# ALLOWED ACCESS
#################################################################
acl persegi src 192.168.0.0/24 ## Sesuaikan
http_access allow persegi
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow persegi
icp_access allow localhost
icp_access deny all
always_direct deny all
#################################################################
# Cache CGI & Administrative
#################################################################
cache_mgr eyditharen@yahoo.com
visible_hostname dns.noval.net
cache_effective_user proxy
cache_effective_group proxy
coredump_dir /var/spool/squid
shutdown_lifetime 10 seconds
logfile_rotate 14

###################################################################
User avatar
Rh354
Posts: 718
Joined: 14 Mar 2010, 19:56
Location: between the truth and the lies
Contact:

Re: help..squid hit lemah

Postby Rh354 » 24 Jun 2010, 05:49

sepertinya gw kenal ni refresh pattern(punya ccpb y)....itu cache_dirnya klo cm 1 HDD mending 1 partisi aja

buat banyak directory maupun partisi cache dalam 1 HDD ga' akan meningkatkan performa tp klo turun iya :D jadikan 1 aja cache_dirnya...coba cache dir dibuat aja 16Gb dengan 1 partisi cache_dir..mainin opsi fstabnya n parameter kernel jg buat ningkatin performa

cache_mem 16 MB ----> ga' kebanyakan nich segini..udah coba 8Mb
max_filedesc 8192 ---> klo pake desktop buat aja 2048

kebanyakan refresh pattern jg ga' baik buat kesehatan squid :D

tambah ram jadi 1Gb :D
User avatar
Th4r3n
Posts: 11
Joined: 04 Jun 2010, 16:24

Re: help..squid hit lemah

Postby Th4r3n » 24 Jun 2010, 07:40

bener bro kirain makin banyak refresh pattern nya makin kencang
ane coba dulu ya bro

" mainin opsi fstabnya n parameter kernel jg buat ningkatin performa " nah yg ini yg pengen tau lebih detail maklum masih nubie
User avatar
sipelaut
Posts: 1963
Joined: 03 Jan 2010, 17:25
Location: madura-sampang
Contact:

Re: help..squid hit lemah

Postby sipelaut » 25 Jun 2010, 16:58

:) nyimak dolo broo... :)
User avatar
suryayusra
Posts: 394
Joined: 05 May 2010, 15:54
Location: Palembang, Indonesia
Contact:

Re: help..squid hit lemah

Postby suryayusra » 26 Jun 2010, 08:29

klo cahce dir banya segitu, sampe 3 direcktory apa gak pp bro cojack :D
klo proxy kantor ane cuma pake 1 cache dir.

mohon pencerahan na.
User avatar
Rh354
Posts: 718
Joined: 14 Mar 2010, 19:56
Location: between the truth and the lies
Contact:

Re: help..squid hit lemah

Postby Rh354 » 26 Jun 2010, 09:13

suryayusra wrote:klo cahce dir banya segitu, sampe 3 direcktory apa gak pp bro cojack :D
klo proxy kantor ane cuma pake 1 cache dir.

mohon pencerahan na.
klo cache_dir dipisah bukan per partisi alias cache_dir dipisah memakai HDD yg berbeda misal 2 ato lebih malah lebih bagus...tp klo make cache_dir banyak partisi di 1 HDD malah ga' efektif n menurunkan performa squidnya :D jadi lebih baik klo cm punya 1 HDD 1 cache_dir..klo mo lebih bagus lg minimal 2 HDD...1 HDD khusus sistem n 1 HDD khusus cache squid (HDDnya ga' usah besar2 mengingat batasan spindle HDD jg mempengaruhi kinerja squid,jadi mending HDD 20 Gb ada 5 biji daripada 1 HDD dengan kapasitas 250Gb)...

maap nubi melangkahi master yg paham squid...
User avatar
suryayusra
Posts: 394
Joined: 05 May 2010, 15:54
Location: Palembang, Indonesia
Contact:

Re: help..squid hit lemah

Postby suryayusra » 26 Jun 2010, 11:56

ooouw begitu rh354 :D
ngerti dah kamsut nya

ane jg udah baca2 blok ente tentang VPS
siiip
User avatar
naruse
Posts: 10
Joined: 26 Jun 2010, 15:16
Location: jakarta
Contact:

Re: help..squid hit lemah

Postby naruse » 26 Jun 2010, 15:28

cache_swap low sama high nya terlalu tinggi nanti cache lebih cepet ke hapus meningan di set normal aja

cache_swap_low 90
cache_swap_high 95

ipcache_low 90
ipcache_high 95

terus jangan terlalu banyak aturan dalam squid.. karena itu membuat squid tidak stabil :)
User avatar
sipelaut
Posts: 1963
Joined: 03 Jan 2010, 17:25
Location: madura-sampang
Contact:

Re: help..squid hit lemah

Postby sipelaut » 26 Jun 2010, 18:09

naruse wrote:terus jangan terlalu banyak aturan dalam squid.. karena itu membuat squid tidak stabil :)

aturan yang seperti apa broo...???
tolong dong kasih tau???
User avatar
naruse
Posts: 10
Joined: 26 Jun 2010, 15:16
Location: jakarta
Contact:

Re: help..squid hit lemah

Postby naruse » 26 Jun 2010, 20:58

# Refresh Pattern
#################################################################
refresh_pattern ^http\:\/\/*\.facebook\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/.*\.windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/office\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/windowsupdate\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w?xpsp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/w2ksp[0-9]\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.microsoft\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/download\.macromedia\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^ftp\:\/\/ftp\.nai\.com/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/ftp\.software\.ibm\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.friendster\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.detik\.com\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.kaskus\.us\/ 10080 80% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.google\.co\*.*/ 10080 90% 43200 reload-into-ims
refresh_pattern ^http\:\/\/*\.yahoo\.co*\.*/ 10080 90% 43200 reload-into-ims

refresh_pattern ^http://*.apps.facebook.*/.* 720 80% 4320
refresh_pattern ^http://*.profile.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.creative.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.static.ak.fbcdn.net/.* 720 80% 4320
refresh_pattern ^http://*.facebook.poker.zynga.com/.* 720 80% 4320
refresh_pattern ^http://*.statics.poker.static.zynga.com/.* 720 80% 4320
refresh_pattern ^http://*.zynga.*/.* 720 80% 4320
refresh_pattern ^http://*.texas_holdem.*/.* 720 80% 4320
refresh_pattern ^http://*.google.*/.* 720 80% 4320
refresh_pattern ^http://*.indowebster.*/.* 720 80% 4320
refresh_pattern ^http://*.4shared.*/.* 720 80% 4320
refresh_pattern ^http://*.yahoo.com/.* 720 80% 4320
refresh_pattern ^http://*.yimg.*/.* 720 80% 4320
refresh_pattern ^http://*.plasa.com/.* 720 80% 4320
refresh_pattern ^http://*.boleh.*/.* 720 80% 4320
refresh_pattern ^http://*.detik.*/.* 180 80% 4320
refresh_pattern ^http://*.detikinet.*/.* 180 80% 4320
refresh_pattern ^http://*.detikhot.*/.* 180 80% 4320
refresh_pattern ^http://*.detiportal.*/.* 180 80% 4320
refresh_pattern ^http://*.kompas.*/.* 180 80% 4320
refresh_pattern ^http://*.kapanlagi.*/.* 720 80% 4320
refresh_pattern ^http://*.google-analytics.*/.* 720 80% 4320

contohnya ...
User avatar
naruse
Posts: 10
Joined: 26 Jun 2010, 15:16
Location: jakarta
Contact:

Re: help..squid hit lemah

Postby naruse » 26 Jun 2010, 22:12

http_port 3128 transparent
icp_port 0
server_http11 on

cache_mem 8 MB

maximum_object_size 20 MB
#maximum_object_size_in_memory 512 KB

cache_swap_low 90%
cache_swap_high 95%
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF

ipcache_size 8192
fqdncache_size 8192
ipcache_low 90
ipcache_high 95

cache_dir aufs /usr/local/squid/cache 20400 48 256

#access_log /usr/local/squid/access.log
cache_log /usr/local/squid/cache.log
cache_store_log none
mime_table /usr/share/squid/mime.conf
#pid_filename /var/run/squid.pid
coredump_dir /var/spool/squid

log_fqdn off
log_icp_queries off
buffered_logs off
emulate_httpd_log off

#==============================================
# FTP section
#==============================================

ftp_list_width 32
ftp_passive on
ftp_sanitycheck on

#dns_nameservers 202.134.0.155 222.124.204.34

refresh_pattern -i \.(class|css|js|gif|jpg|ps)$ 0 80% 43200 ignore-reload overr$
refresh_pattern -i \.(jpe|jpeg|png|bmp|tif)$ 0 80% 43200 ignore-reload overrid$
refresh_pattern -i \.(tiff|mov|avi|qt|mpeg|flv|ra|rm|wmv|divx)$ 0 80% 43200 ign$
refresh_pattern -i \.(mpg|mpe|wav|au|mid|mp3|mp4|ac4|swf)$ 0 80% 43200 ignore-r$
refresh_pattern -i \.(zip|gz|arj|lha|lzh|7z)$ 0 80% 43200 ignore-reload overrid$
refresh_pattern -i \.(rar|tgz|tar|exe|bin|rpm|iso)$ 0 80% 43200 ignore-reload o$
refresh_pattern -i \.(hqx|pdf|rtf|doc|swf|xls|ppt|pdf|docx|xlsx)$ 0 80% 43200 i$
refresh_pattern -i \.(inc|cab|ad|txt|dll|dat)$ 0 80% 43200 ignore-reload overr$

refresh_pattern /.gif 4320 50% 43200
refresh_pattern /.jpg 4320 50% 43200
refresh_pattern /.jpeg 4320 50% 43200
refresh_pattern /.png 4320 50% 43200
refresh_pattern ^http://mail.yahoo.com/.* 720 80% 10080
refresh_pattern ^http://*.yahoo.*/.* 720 50% 7200
refresh_pattern ^http://*.detik.com/.* 720 50% 2880
refresh_pattern ^http://*.facebook.com/.* 720 90% 10080
refresh_pattern ^http://*.4shared.com/.* 720 50% 10080
refresh_pattern ^http://*.youtube.com/.* 720 70% 10080
refresh_pattern ^ftp: 1440 50% 12960 reload-into-ims
refresh_pattern ^gopher: 1440 0% 10080
refresh_pattern . 0 20% 4320

#quick_abort_min 0 KB
#quick_abort_max 0 KB
#quick_abort_pct 100%

#==============================================
# ACL section
#==============================================
request_timeout 15 seconds
shutdown_lifetime 15 seconds
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 # RFC1918 possible internal network
acl localnet1 src 192.168.xx.xx/24 # RFC1918 possible internal network
acl localnet2 src 192.168.xx.xx/24 # RFC1918 possible internal network
acl localnet3 src 192.168.xx.xx/24
acl localnet4 src 10.10.xx.xxx/32
acl SSL_ports port 443 563
acl Safe_ports port 20
acl Safe_ports port 21
acl Safe_ports port 70
acl Safe_ports port 80
acl Safe_ports port 81
acl Safe_ports port 443 563
acl Safe_ports port 210
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Safe_ports port 1025-65535
acl PURGE method PURGE
acl CONNECT method CONNECT

http_reply_access allow all

http_access allow manager localhost
http_access allow PURGE localhost
http_access allow localnet1
http_access allow localnet2
http_access allow localnet3
http_access allow localnet4

http_access deny localhost
http_access deny PURGE
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
visible_hostname orange
header_access Accept-Encoding deny all

#==============================================
# MISCELLANEOUS
#==============================================
logfile_rotate 7
negative_ttl 2 minutes
client_persistent_connections off
server_persistent_connections off
pipeline_prefetch on
vary_ignore_expire on
reload_into_ims on
nonhierarchical_direct off
prefer_direct off
memory_pools off
ie_refresh on

cache_effective_user squid
cache_effective_group squid

cache_mgr rizal_manthony@yahoo.com


bro pake ini aja .. ini settingan saya. coba aja sapa tau bisa membantu ... nanti kreasikan sendiri aja
User avatar
Th4r3n
Posts: 11
Joined: 04 Jun 2010, 16:24

Re: help..squid hit lemah

Postby Th4r3n » 30 Jun 2010, 12:12

ok thanks di coba bro
User avatar
Th4r3n
Posts: 11
Joined: 04 Jun 2010, 16:24

Re: help..squid hit lemah

Postby Th4r3n » 30 Jun 2010, 12:26

2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(class|css|js|gif|jpg|ps)$': overr$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(jpe|jpeg|png|bmp|tif)$': overrid$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(tiff|mov|avi|qt|mpeg|flv|ra|rm|wmv|divx)$': ign$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(mpg|mpe|wav|au|mid|mp3|mp4|ac4|swf)$': ignore-r$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(zip|gz|arj|lha|lzh|7z)$': overrid$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(rar|tgz|tar|exe|bin|rpm|iso)$': o$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(hqx|pdf|rtf|doc|swf|xls|ppt|pdf|docx|xlsx)$': i$
2010/06/30 12:25:51| parse_refreshpattern: Unknown option '\.(inc|cab|ad|txt|dll|dat)$': overr$
FATAL: getpwnam failed to find userid for effective user 'squid'
Squid Cache (Version 2.7.STABLE7): Terminated abnormally.


erroor bro
User avatar
Rh354
Posts: 718
Joined: 14 Mar 2010, 19:56
Location: between the truth and the lies
Contact:

Re: help..squid hit lemah

Postby Rh354 » 30 Jun 2010, 12:34

gw mah simpel2 aja

###########################################
# HIGH PERFORMANCE SQUID 2.7
# Config date : 21 April 2010
###########################################

# ACCESS CONTROLS
# -----------------

acl QUERY urlpath_regex -i cgi-bin \? \.php$ \.asp$ \.shtml$ \.cfm$ \.cfml$ \.phtml$ \.php3$ localhost
acl localnet src 10.0.0.0/8
acl localnet src 172.16.0.0/12
acl localnet src 192.168.0.0/16
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/32
acl safeports port 21 70 80 210 280 443 488 563 591 631 777 901 81 3128 1025-65535
acl sslports port 443 563 81
acl manager proto cache_object
acl purge method PURGE
acl connect method CONNECT
acl ym dstdomain .messenger.yahoo.com .psq.yahoo.com
acl ym dstdomain .us.il.yimg.com .msg.yahoo.com .pager.yahoo.com
acl ym dstdomain .rareedge.com .ytunnelpro.com .chat.yahoo.com
acl ym dstdomain .voice.yahoo.com
acl ymregex url_regex yupdater.yim ymsgr myspaceim

http_access deny ym
http_access deny ymregex
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !safeports
http_access deny CONNECT !sslports
http_access allow localhost
http_access allow localnet
http_access deny all

# NETWORK OPTIONS
# -----------------
http_port 3128 transparent
#htcp_port 4827
icp_access deny all

# OPTIONS WHICH AFFECT THE CACHE SIZE
# -----------------------------------

cache_mem 8 MB
maximum_object_size_in_memory 32 KB
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
cache_dir aufs /cache 4000 10 256
maximum_object_size 128000 KB
cache_swap_low 90
cache_swap_high 95
update_headers off

# LOGFILE PATHNAMES AND CACHE DIRECTORIES
# ---------------------------------------

#access_log /cache/access.log
access_log none
cache_log /cache/cache.log
#cache_log /dev/null
cache_store_log none
logfile_rotate 5
log_ip_on_direct off
log_icp_queries off
buffered_logs off
netdb_filename none
client_db off
#pid_filename /var/run/squid.pid

# OPTIONS FOR TUNING THE CACHE
# ----------------------------

cache deny QUERY
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(rpm|cab|deb|exe|msi|msu|zip|tar|gz|tgz|rar|bin|7z|doc?|xls?|ppt?|pdf|nth|psd|sis)$ 10080 90% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)$ 43200 95% 432000 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(html|htm|css|js)$ 1440 75% 40320
refresh_pattern -i \.index.(html|htm)$ 0 75% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 1440 90% 10080

quick_abort_min 0 KB
quick_abort_max 0 KB
quick_abort_pct 98
store_avg_object_size 13 KB

# HTTP OPTIONS
# -------------

server_http11 on
collapsed_forwarding on
vary_ignore_expire on
header_access From deny all
header_access Server deny all
header_access Link deny all
header_access Via deny all
header_access X-Forwarded-For deny all

# TIMEOUTS
# --------

forward_timeout 240 second
connect_timeout 30 second
peer_connect_timeout 5 second
read_timeout 600 second
request_timeout 60 second
persistent_request_timeout 60 second
client_lifetime 86400 second
half_closed_clients off
pconn_timeout 60 second
shutdown_lifetime 10 second

# ADMINISTRATIVE PARAMETERS
# ---------------------------

cache_mgr Rh354
cache_effective_user proxy
cache_effective_group proxy
httpd_suppress_version_string on
visible_hostname Rh354

# ADVANCED NETWORKING OPTIONS
# -----------------------------

max_filedescriptors 2048

# DNS OPTIONS
# -------------

check_hostnames off
dns_timeout 10 seconds
#DNS NAWALA
dns_nameservers 127.0.0.1
#dns_nameservers 180.131.144.144
#dns_nameservers 180.131.144.145
hosts_file /etc/hosts
ipcache_size 8192
ipcache_low 90
ipcache_high 95

# MISCELLANEOUS
# --------------

memory_pools off
forwarded_for off
reload_into_ims on
coredump_dir /cache
pipeline_prefetch on
offline_mode off

###### END CONFIGURATION ###########
User avatar
Th4r3n
Posts: 11
Joined: 04 Jun 2010, 16:24

Re: help..squid hit lemah

Postby Th4r3n » 30 Jun 2010, 12:35

dah di hapus pattern nya

eroor juga bro

oot@noval:~# squid -f /etc/squid/squid.conf -z
FATAL: getpwnam failed to find userid for effective user 'squid'
Squid Cache (Version 2.7.STABLE7): Terminated abnormally.
CPU Usage: 0.004 seconds = 0.004 user + 0.000 sys
Maximum Resident Size: 5968 KB
Page faults with physical i/o: 0
Aborted (core dumped)

apa nya lg ya ??? help.. new bie neh
User avatar
Rh354
Posts: 718
Joined: 14 Mar 2010, 19:56
Location: between the truth and the lies
Contact:

Re: help..squid hit lemah

Postby Rh354 » 30 Jun 2010, 12:55

disesuaikan donk ama

cache_effective_user proxy
cache_effective_group proxy

make proxy apa squid..jgn lsg kopas :blush:

jgn lupa di chown

chown -R user:grupnya tempat partisi cachenya

klo di gw

chown -R proxy:proxy /cache

pastikan bener dl konfigurasinya

sudo squid -k parse

klo ga' ada tulisan apa2 berarti ga' error..
User avatar
naruse
Posts: 10
Joined: 26 Jun 2010, 15:16
Location: jakarta
Contact:

Re: help..squid hit lemah

Postby naruse » 30 Jun 2010, 16:35

intinya setiap apa yang diset di squid.conf, setingan itu harus ada..
misal mulai dari log nya harus ada dan harus di rumah owner nya sesuai dengan cache_effective_user/ cache_effective_group di squid.conf

jdi cek dulu ada kaga cache.log dan access.log nya dan sesuai dengan setingan di squid.conf nya tidak ... ini buat masukan buat para newbie kayak saya ^^
User avatar
naruse
Posts: 10
Joined: 26 Jun 2010, 15:16
Location: jakarta
Contact:

Re: help..squid hit lemah

Postby naruse » 30 Jun 2010, 16:38

itu kesalahan di refresh pattern saya kurang lengkap copy dari squid saya

yang bener ignore-reload override-expire reload-into-ims
User avatar
sipelaut
Posts: 1963
Joined: 03 Jan 2010, 17:25
Location: madura-sampang
Contact:

Re: help..squid hit lemah

Postby sipelaut » 30 Jun 2010, 19:25

> hosts_file /etc/hosts
broo untuk file di /etc/hosts diisi apa yaa ??
soalnya bingung nichh sama settingan yang ini
setelah liat dari beberapa tutorial ada yang makek dan ada yg gak makek??
User avatar
naruse
Posts: 10
Joined: 26 Jun 2010, 15:16
Location: jakarta
Contact:

Re: help..squid hit lemah

Postby naruse » 30 Jun 2010, 19:58

topologi kamu emang seperti apa bro ? linux nya sebagai server dan proxy atau gimana nih ?

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 7 guests