squid.conf ของ squidNT 2.6 Stable 5 นะครับ ส่วนอะไรเป็นอะไร อ่านดูเอาเองนะครับ...เพราะว่าของแบบนี้ต้องทำเองถึงจะรู้เองนะครับส่วน config ตัวนี้ผมเองก็ใช้อยู่ปัจจุบันทดสอบแล้วโดยการเปิดทิ้งไว้มาเกือบเดือน มันก็ยัง OK อยุ่ ถ้าใครจะโมอะไรเพิ่มก็ตามบายเลยอย่าลืมเอา sorce มาแจกกันบ้างหละกันนะครับ :) ๛sc ๛emo197:
http://www.siamcafe.net/squid และ
http://www.siamcafe.net/squid1.html และกระทู้เก่าๆเกี่ยวข้องกับ Squid อีกเพียบ ในเวปไซค์นี้ยาวเป็นกิโล :laugh: ๛emo195: ๛emo195: ๛emo195:
อยากรู้ว่าอะไรคือ Squid ปลาหมึกตัวนี้มีดีอะไรเผ็ดร้อนแค่ใหน ต้องอ่านทำความเข้าใจเองนะครับนี่เลย ไปแก้ไข dir เก็บ cache กันเอาเองนะครับ save เป็น squid.conf แล้ว copy ไปไว้ใน c:\squid\etc ไว้ว่างๆจะทำตัว intall ให้ version นี้แจ่มมากๆขอบอก ส่วน config นี้ผมโมแบบสุดๆแล้วแทบไม่ต้องแก้ไขอะไรอีกแล้วลองดูเองหละกันว่าเร็วสะใจแค่ใหน 8)#dns_nameservers 192.168.0.100 192.168.1.2
icp_port 0
http_port 3128
http_port 800
#cache_peer 203.144.143.6 parent 8080 0 no-query
#cache_peer 192.168.0.1 sibling 3128 0 no-query
#cache_peer 192.168.0.100 parent 800 0 no-query
#peer_connect_timeout 5 seconds
#
Round-Robin คือ การที่เรามี proxy หลายๆตัวอยากจะทำ proxy แบบ Load Balance ก็เอา ตัวอย่างด้านล่างนี้ไปแก้ไขดัดแปลงกันได้เลยครับ
#เพราะมันจะไปเกาะ proxy หลายๆตัว แต่ต้องใช้งานได้จริงๆนะครับ นี่ผมยกตัวอย่างให้เฉยๆเพื่อจะได้ GET#cache_peer proxy.asianet.co.th parent 8080 3130 round-robin no-query
#cache_peer proxy2.asianet.co.th parent 3128 3130 round-robin no-query
hierarchy_stoplist cgi-bin ? .pl .cgi .php .php3 .php4 .shtml
acl QUERY urlpath_regex cgi-bin \? \.pl \.cgi \.php \.php3 \.php4 \.shtml
no_cache deny QUERY
cache_mem 256 MB
maximum_object_size_in_memory 24 Kb
minimum_object_size 0 KB
maximum_object_size 20480 KB
memory_replacement_policy heap GDSF
cache_replacement_policy heap GDSF
# ตรงนี้แก้ไขกันเอาเองนะครับว่าจะให้เก็บ cache ไว้ที drive ใหนของผมใช้ hdd 2 ลูกเลย twin cache เลย
cache_dir aufs e:/cache/cache1 3413 16 256
cache_dir aufs e:/cache/cache2 3413 16 256
access_log none
cache_log none
cache_store_log none
mime_table c:/squid/etc/mime.conf
log_mime_hdrs off
cache_effective_user squid
cache_effective_group squid
refresh_pattern -i .(zip|gz|xfs|exe|arj|npz|lha|lzh|rar|tgz|tar|rar|jar|nup|wz|Z)$ 525960 90% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(class|pdf|rtf|doc|wp|wp5|ps|prn)$ 525960 90% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(mov|avi|mpg|wav|au|mid|mp3)$ 525960 80% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(jpg|gif|jpeg|png|css|js)$ 525960 18000% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(bmp|tif|tiff|xbm)$ 525960 17000% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern -i .(swf)$ 525960 20000% 525960 override-lastmod override-expire reload-into-ims ignore-reload
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 1440 50% 14400
umask 027
via off
forwarded_for off
coredump_dir c:/squid/var/cache
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
#acl MSN_ports port 1863
acl Safe_ports port 80 21 443 563 70 210 210 1025-65535 280 488 591 777
acl CONNECT method CONNECT
acl localnetwork0 src 127.0.0.0/8
acl localnetwork1 src 192.168.0.0/24
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnetwork0
http_access allow localnetwork1
http_access deny all
http_reply_access allow all
icp_access deny all
ftp_sanitycheck off
ie_refresh on
visible_hostname proxyBYsiamcafe.net
cache_mgr
[email protected]