daily pastebin goal
48%
SHARE
TWEET

squid.conf_LUSCA Head r14809

n4yla Mar 18th, 2013 9,216 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ###########################################
  2. # WELCOME TO SQUID LUSCA_HEAD-r14809      #
  3. # Tunning by : AlaskaRian-Network & Brian #
  4. ###########################################
  5. offline_mode on
  6. cache_mgr admin@brianrahimsyah.com
  7. #============================================================================================================================#
  8. #=========================================================#  AWAL  #=========================================================#
  9. #============================================================================================================================#
  10. acl all src all
  11. acl manager proto cache_object
  12. acl localhost src 127.0.0.1/32
  13. acl to_localhost dst 127.0.0.0/8
  14. acl localnet src 192.168.20.0/24 # RFC1918 possible internal network  #Sesuaikan dengan network Anda
  15. #acl localnet src 10.0.1.0/24 # RFC1918 possible internal network
  16. #acl localnet src 10.0.2.0/24 # RFC1918 possible internal network
  17. acl SSL_ports port 443
  18. acl Safe_ports port 80 # http
  19. acl Safe_ports port 21 # ftp
  20. acl Safe_ports port 443 # https
  21. acl Safe_ports port 70 # gopher
  22. acl Safe_ports port 210 # wais
  23. acl Safe_ports port 1025-65535 # unregistered ports
  24. acl Safe_ports port 280 # http-mgmt
  25. acl Safe_ports port 488 # gss-http
  26. acl Safe_ports port 591 # filemaker
  27. acl Safe_ports port 777 # multiling http
  28. acl CONNECT method CONNECT
  29. http_access allow manager localhost
  30. http_access deny manager
  31. http_access deny !Safe_ports
  32. http_access deny CONNECT !SSL_ports
  33. http_access allow localnet
  34. http_access deny all
  35. icp_access allow localnet
  36. icp_access deny all
  37. http_port 8080 transparent
  38.  
  39. #cache_dir aufs /cache/ 10000 16 256
  40. cache_dir aufs /cache 25600 60 256
  41.  
  42. cache_mem 8 MB
  43. maximum_object_size_in_memory 128 MB
  44. minimum_object_size 1 bytes
  45. maximum_object_size 393216 KB
  46. cache_swap_low 95
  47. cache_swap_high 99
  48. access_log /var/log/squid/access.log
  49. cache_log /var/log/squid/cache.log
  50. cache_store_log /var/log/squid/store.log
  51. acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
  52. upgrade_http0.9 deny shoutcast
  53. acl apache rep_header Server ^Apache
  54. broken_vary_encoding allow apache
  55. cache_effective_user proxy
  56. cache_effective_group proxy
  57.  
  58. #=================================================================================================================================#
  59. #=========================================================#  REGEX URL  #=========================================================#
  60. #=================================================================================================================================#
  61. coredump_dir /cache/
  62. ###############################################################################
  63. #acl PHP77 url_regex forum.php forumdisplay.php showthread.php showthreads.php
  64. #acl PHP77 url_regex download.php downloads.php classifieds.php classified.php
  65. #acl PHP77 url_regex forum
  66. #no_cache deny PHP77
  67.  
  68. #hierarchy_stoplist cgi-bin ? localhost
  69. #acl QUERY22 urlpath_regex cgi-bin \? localhost
  70. #no_cache deny QUERY22
  71. ################################################################################
  72. #acl store_rewrite_list urlpath_regex \/(get_video|videoplayback\?id|videoplayback.*id) \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|swf)
  73. #acl store_rewrite_list_domain url_regex ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
  74. #acl store_rewrite_list_domain url_regex (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
  75. #acl store_rewrite_list_path urlpath_regex \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$
  76. #acl store_rewrite_list_domain_CDN url_regex \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.* yieldmanager cpxinteractive ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com
  77.  
  78. emulate_httpd_log off
  79. server_http11 on
  80. redirector_bypass on
  81.  
  82. acl video urlpath_regex                   \/(get_video|videoplayback\?id|videoplayback.*id)
  83. acl speedtest urlpath_regex               \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|wmv|3gp|mp(4|3)|exe|msi|zip|on2|mar|txt)\?
  84. acl angka1 url_regex                      ^http:\/\/([a-zA-Z-]+[0-9-]+)\.[A-Za-z]*\.[A-Za-z]*
  85. acl angka2 url_regex                      (([a-z]{1,2}[0-9]{1,3})|([0-9]{1,3}[a-z]{1,2}))\.[a-z]*[0-9]?\.[a-z]{3}
  86. acl gambar urlpath_regex                  \.(jp(e?g|e|2)|gif|png|tiff?|bmp|ico|flv|avc|zip|mp3|3gp|rar|on2|mar|exe)$
  87. acl rapidshare url_regex                  \.rapidshare\.com.*\/[0-9]*\/.*\/[^\/]* ^http:\/\/(www\.ziddu\.com.*\.[^\/]{3,4})\/(.*) \.doubleclick\.net.*
  88. acl photobucket url_regex                 ^http:\/\/[.a-z0-9]*\.photobucket\.com.*\.[a-z]{3}$ quantserve\.com
  89. acl google url_regex                      ^http:\/\/[a-z]+[0-9]\.google\.co(m|\.id)
  90. acl indowebster url_regex                 ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(rar|zip|flv|wm(a|v)|3gp|mp(4|3)|exe|msi|avi|(mp(e?g|a|e|1|2|3|4))|cab|exe)
  91. acl getmethod method GET
  92.  
  93. storeurl_access allow video
  94. storeurl_access allow speedtest
  95. storeurl_access allow gambar
  96. storeurl_access allow rapidshare
  97. storeurl_access allow photobucket
  98. storeurl_access allow indowebster
  99. storeurl_access deny all
  100.  
  101. storeurl_rewrite_program /usr/local/squid/etc/storeurl.pl
  102. storeurl_rewrite_children 1
  103. storeurl_rewrite_concurrency 100
  104. #storeurl_rewrite_children 15 #7
  105. #storeurl_rewrite_concurrency 10 #60
  106.  
  107.  
  108. #=======================================================================================================================================#
  109. #=========================================================#  REFRESH PATTERN  #=========================================================#
  110. #=======================================================================================================================================#
  111. # VIDEO CACHE
  112. refresh_pattern ^http://(.*?)/get_video\? 10080 90% 432000 override-expire ignore-no-cache ignore-private
  113. refresh_pattern ^http://(.*?)/videoplayback\? 10080 90% 432000 override-expire ignore-no-cache ignore-private
  114. refresh_pattern -i (get_video\?|videoplayback\?id|videoplayback.*id) 161280 50000% 525948 override-expire ignore-reload
  115.  
  116. # facebook
  117. refresh_pattern ((facebook.com)|(85.131.151.39)).*\.(jpg|png|gif) 129600 100% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
  118. refresh_pattern ((tagged.com)|(96.17.109.27)).*\.(jpg|png|gif) 129600 100% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
  119. refresh_pattern static\.ak\.fbcdn\.net*\.(jpg|gif|png) 129600 100% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
  120. refresh_pattern ^http:\/\/profile\.ak\.fbcdn.net*\.(jpg|gif|png) 129600 100% 129600 ignore-reload override-expire ignore-no-cache ignore-no-store store-stale
  121. refresh_pattern edgecastcdn.\net.*\.swf? 129600 100% 129600 override-expire ignore-reload store-stale
  122. refresh_pattern \.(jp(e?g|e|2)|tiff?|bmp|gif|png)($|&) 129600 100% 129600 ignore-no-cache ignore-no-store reload-into-ims override-expire store-stale
  123. refresh_pattern .zynga.net.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  124. refresh_pattern .zynga.com.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  125. refresh_pattern .farmville.net.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  126. refresh_pattern .farmville.com.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  127. refresh_pattern .ninjasaga.com.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  128. refresh_pattern .apps.facebook.com.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  129. refresh_pattern .frontierville.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  130. refresh_pattern .tagged.*\.(jpg|gif|png|swf|mp3)($|&) 129600 100% 129600 store-stale
  131.  
  132. #ads
  133. refresh_pattern ^.*(utm\.gif|ads\?|rmxads\.com|ad\.z5x\.net|bh\.contextweb\.com|bstats\.adbrite\.com|a1\.interclick\.com|ad\.trafficmp\.com|ads\.cubics\.com|ad\.xtendmedia\.com|\.googlesyndication\.com|advertising\.com|yieldmanager|game-advertising\.com|pixel\.quantserve\.com|adperium\.com|doubleclick\.net|adserving\.cpxinteractive\.com|syndication\.com|media.fastclick.net).* 129600 20% 129600 ignore-no-cache ignore-no-store ignore-private override-expire ignore-reload ignore-auth store-stale negative-ttl=40320 max-stale=1440
  134. #specific sites
  135. refresh_pattern ^.*safebrowsing.*google 129600 100% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth negative-ttl=10080 store-stale
  136. refresh_pattern (get_video\?|videoplayback\?|videodownload\?|\.flv?) 129600 99100% 129600 override-expire ignore-reload store-stale
  137. refresh_pattern \.(ico|video-stats) 129600 100% 129600 override-expire ignore-reload ignore-no-cache ignore-no-store ignore-private ignore-auth override-lastmod negative-ttl=10080 store-stale
  138.  
  139. # pictures & images
  140. refresh_pattern -i \.(gif|png|jpeg|jpg|bmp|tif|tiff|ico|swf)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private store-stale
  141. refresh_pattern -i \.(gif|png|jpeg|jpg|bmp|tif|tiff|ico|swf)\? 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private store-stale
  142.  
  143. # website
  144. #refresh_pattern -i \.(xml|html|htm|js|jsp|txt|css|php|asp)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale
  145. refresh_pattern -i \.(xml|js|jsp|txt|css)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale
  146. refresh_pattern -i \.(xml|js|jsp|txt|css)\? 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth store-stale
  147.  
  148. #sound, video multimedia
  149. refresh_pattern -i \.(flv|x-flv|mov|avi|qt|mpg|mpeg|wmv)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache store-stale
  150. refresh_pattern -i \.(wav|mp3|mp4|au|mid)$ 10080 50% 43200 override-expire override-lastmod reload-into-ims ignore-reload ignore-no-cache ignore-auth ignore-private store-stale
  151.  
  152. # files
  153. refresh_pattern -i \.(iso|deb|rpm|zip|tar|tgz|ram|rar|bin|ppt|doc)$ 10080 90% 43200 ignore-no-cache ignore-auth store-stale
  154. refresh_pattern -i \.(zip|gz|arj|lha|lzh)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale
  155. refresh_pattern -i \.(rar|tgz|tar|exe|bin)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth ignore-reload ignore-no-cache store-stale
  156. refresh_pattern -i \.(hqx|pdf|rtf|doc|swf)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale
  157. refresh_pattern -i \.(inc|cab|ad|txt|dll)$ 10080 100% 43200 override-expire ignore-no-cache ignore-auth store-stale
  158.  
  159. #IIX DOWNLOAD
  160. refresh_pattern ^http:\/\/\.www[0-9][0-9]\.indowebster\.com\/(.*)(mp3|rar|zip|flv|wmv|3gp|mp(4|3)|exe|msi|zip) 43200 99999% 129600 reload-into-ims ignore-reload override-expire ignore-no-cache ignore-no-store store-stale ignore-auth
  161.  
  162. #default option
  163. refresh_pattern ^ftp: 1440 20% 10080
  164. refresh_pattern -i (/cgi-bin/|\?) 1     0%      2
  165. refresh_pattern ^gopher: 1440 0% 1440
  166. refresh_pattern . 0 20% 4320 store-stale
  167.  
  168.  
  169. #=============================================================================================================================#
  170. #=========================================================#  TOOLS  #=========================================================#
  171. #=============================================================================================================================#
  172. memory_replacement_policy heap GDSF
  173. cache_replacement_policy heap LFUDA
  174. negative_ttl 2 minutes
  175. half_closed_clients off
  176.  
  177. connect_timeout 1 minute
  178. read_timeout 15 minutes
  179. request_timeout 5 minutes
  180. persistent_request_timeout 2 minutes
  181. half_closed_clients on
  182. shutdown_lifetime 30 seconds
  183.  
  184.  
  185. icp_port 0
  186. prefer_direct off
  187.  
  188. ipcache_size 5120
  189. ipcache_low 95
  190. ipcache_high 99
  191.  
  192. fqdncache_size 5120
  193.  
  194. memory_pools off
  195. log_icp_queries off
  196. icp_hit_stale on
  197. query_icmp on
  198. reload_into_ims on
  199. pipeline_prefetch on
  200. vary_ignore_expire on
  201.  
  202. visible_hostname ICT_Team_SMPBU
  203. unique_hostname ICT_Team_SMPBU
  204. cachemgr_passwd none all
  205. client_db on
  206. max_filedescriptors 65535
  207.  
  208. # TAG: ZPH
  209. zph_mode tos
  210. zph_local 0x30
  211. zph_parent 0
  212. zph_option 136
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top