squid and linuxplanet

M.W.Chang linuxism
Mon May 17 11:28:52 PDT 2004


attached is my squid.conf.
When I access http://www.linuxplanet.com many images and links are
broken.
But for most other sites, it's working fine. 
I searched google.com and read through squid faq, no clue found.

-- 
May the Force and Farce be with Linux and you.
Join the friendly chit-chat in http://www.linux-sxs.org &
news://news.hkpcug.org
-------------- next part --------------
# 
# http://www.linuxdoc.org/HOWTO/Bandwidth-Limiting-HOWTO/install.html#AEN78
# http://www.uck.uni.torun.pl/~maciek/w3cache/perf.html
# http://www.zockbar.de/html/eon-proxy.html
#
cache_effective_user proxy
cache_effective_group daemon
#
pid_filename		/var/run/squid.pid
cache_access_log	/var/log/squid.access
cache_log		/var/log/squid.cache
cache_store_log		/var/log/squid.store
# cache_swap_log	/var/log/squid.swap
#
cache_mem 16 MB
maximum_object_size 3000 kb
store_avg_object_size 50 kb
#
log_icp_queries off
buffered_logs on
cache_replacement_policy heap GDSF
redirect_rewrites_host_header off
cache_dir ufs /var/spool/squid 250 16 256
#
# In addition you'll have to replace 'yourlogin' and 'yourpassword' with your own account informations.
# cache_peer 194.177.32.11 parent 8080 7 no-query no-digest no-netdb-exchange default login=yourlogin:yourpassword

#
http_port 3128
icp_port 0
#
httpd_accel_with_proxy on
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_uses_host_header on
#
refresh_pattern         ^ftp:           1440    20%     10080
refresh_pattern         ^gopher:        1440    0%      1440
refresh_pattern         .               0       20%     4320
#
acl localhost src 127.0.0.1/255.255.255.255
acl localnet src 192.168.2.0/255.255.255.0
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
# acl SSL_ports port 443 563
acl Safe_ports port 80 20 21 70 119 1025-65535
acl CONNECT method CONNECT
#
http_access allow localnet
http_access allow localhost
http_access deny manager
#http_access deny !Safe_ports
#http_access deny CONNECT !SSL_ports
http_access deny all
#
icp_access allow all
miss_access allow all
#
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
#
# do not cache local hosts
acl local dst 192.168.2.0/255.255.255.0
no_cache deny local
always_direct allow local
#
#all our LAN users will be seen by external web servers
#as if they all used Mozilla on Linux. :)
# anonymize_headers deny User-Agent
# fake_user_agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6+) Gecko/20011122
#
#This is useful when we want to use the Cache Manager.
#Copy cachemgr.cgi to cgi-bin of your www server.
#You can reach it then via a web browser typing
#the address http://your-web-server/cgi-bin/cachemgr.cgi
cachemgr_passwd secret_password all
cache_mgr toylet at hongkong.com
#
# We'll use those files to get better latency times.
# They tell Squid what kind of data it should retreive directly.
# If none of the regex matches the requested URL Squid will
# tell the EON Proxy to transfer the file via Satellite.
acl mimetype-text urlpath_regex -i "/etc/squid/mime.text"
acl mimetype-images urlpath_regex -i "/etc/squid/mime.images"
always_direct allow mimetype-text
always_direct allow mimetype-images
never_direct allow all
#
#
#####DELAY POOLS
#This is the most important part for shaping incoming traffic with Squid
#For detailed description see squid.conf file or docs at http://www.squid-cache.org
 
#We don't want to limit downloads on our local network.
acl magic_words1 url_regex -i 192.168
 
#We want to limit downloads of these type of files
#Put this all in one line
acl magic_words2 url_regex -i ftp .exe .mp3 .vqf .tar.gz .gz .rpm .zip .rar .avi .mpeg .mpe .mpg .qt .ram .rm .iso .raw .wav .mov
#We don't block .html, .gif, .jpg and similar files, because they
#generally don't consume much bandwidth

#We want to limit bandwidth during the day, and allow
#full bandwidth during the night
#Caution! with the acl below your downloads are likely to break
#at 23:59. Read the FAQ in this bandwidth if you want to avoid it.
acl day time 09:00-23:59
 
#We have two different delay_pools
#View Squid documentation to get familiar
#with delay_pools and delay_class.
delay_pools 2
 
#First delay pool
#We don't want to delay our local traffic.
#There are three pool classes; here we will deal only with the second.
#First delay class (1) of second type (2).
delay_class 1 2
 
#-1/-1 mean that there are no limits.
delay_parameters 1 -1/-1 -1/-1
 
#magic_words1: 192.168 we have set before
delay_access 1 allow magic_words1
 

#Second delay pool.
#we want to delay downloading files mentioned in magic_words2.
#Second delay class (2) of second type (2).
delay_class 2 2
 
#The numbers here are values in bytes;
#we must remember that Squid doesn't consider start/stop bits
#5000/150000 are values for the whole network
#5000/120000 are values for the single IP
#after downloaded files exceed about 150000 bytes,
#(or even twice or three times as much)
#they will continue to download at about 5000 bytes/s
 
delay_parameters 2 5000/150000 5000/120000
#We have set day to 09:00-23:59 before.
delay_access 2 allow day
delay_access 2 deny !day
delay_access 2 allow magic_words2


More information about the Linux-users mailing list