[squid-users] Squid 2.7stable9 youtube not caching

From: sameer khan <khanzadap_at_hotmail.com>
Date: Fri, 13 Aug 2010 12:06:37 +0000

hi all

I have upgraded from squid 2.7stable6 to 2.7stable9  but since then it is not caching youtube content. I have another machine with the same config but 2.7.stable6, seems to cache youtube fine. Is there some different way of configuring stable9 for youtube cache ( as far as i have checked is same as 2.7 stable9 ). below is my configuration of 2.7.stable9

acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl xx src xxx.xx.xx.0/22
acl xxxx src xxx.xxx.xxx.0/22
acl xxxx src xxx.xxx.xxx.0/21
acl xxx src xxx.xxx.xxx.xxx/29
acl snmppublic snmp_community xxxx
acl snmpallowlist src xxx.xxx.xx.xxx/32
acl PURGE method purge
http_access allow purge localhost
http_access deny purge
acl localnet src 10.0.0.0/8     # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443         # https
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
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 CONNECT method CONNECT
acl store_rewrite_list urlpath_regex \/(get_video\?|videodownload\?|videoplayback.*id)
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow xx
http_access allow xxx
http_access allow xxxx
http_access allow xxxxx
http_access deny all
icp_access allow localnet
icp_access deny all
delay_pool_uses_indirect_client off
log_uses_indirect_client off
http_port 55555 tproxy transparent
zph_mode tos
zph_local 0x30
hierarchy_stoplist cgi-bin ?
cache_mem 2048 MB
maximum_object_size_in_memory 4096 KB
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
cache_dir coss /usr/local/squid/var/cache/sdb2 31000 block-size=4096 max-size=1000000 maxfullbufs=20 membufs=300
cache_dir coss /usr/local/squid/var/cache/sdb3 31000 block-size=4096 max-size=1000000 maxfullbufs=20 membufs=300
cache_dir coss /usr/local/squid/var/cache/sdc2 31000 block-size=4096 max-size=1000000 maxfullbufs=20 membufs=300
cache_dir coss /usr/local/squid/var/cache/sdc3 31000 block-size=4096 max-size=1000000 maxfullbufs=20 membufs=300
cache_dir aufs /usr/local/squid/var/cache/sdb1 90000 16 256 min-size=1000000
cache_dir aufs /usr/local/squid/var/cache/sdc1 90000 16 256 min-size=1000000
maximum_object_size 2 GB
 cache_swap_low 94
 cache_swap_high 95
cache_store_log none
debug_options ALL,1
storeurl_access allow store_rewrite_list
storeurl_access deny all
storeurl_rewrite_program /usr/local/squid/storeurl.pl
storeurl_rewrite_children 30
storeurl_rewrite_concurrency 50
url_rewrite_program /usr/local/ufdbguard/bin/ufdbgclient -C -l /usr/local/ufdbguard/logs
url_rewrite_children 64
url_rewrite_concurrency 2
redirector_bypass on
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern -i (/cgi-bin/|\?) 0     0%      0
refresh_pattern -i \.flv$ 4320 90% 10080 ignore-no-cache override-expire ignore-private
refresh_pattern -i \.(gif|png|jpg|bmp|png|tiff|pdf|ps|xml|jpeg|ico)$ 4320 90% 10080 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(iso|avi|wav|wma|mp3|mp4|mpeg|swf|flv|x-flv)$ 4320 90% 10080 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.(deb|rpm|exe|zip|tar|tgz|ram|rar|bin|ppt|doc|gz)$ 4320 90% 14400 override-expire ignore-no-cache ignore-private
refresh_pattern -i \.index.(html|htm)$ 0 40% 10080 override-expire ignore-no-cache ignore-private
refresh_pattern (get_video\?|videoplayback\?|videodownload\?) 5259487 99999999% 5259487 override-expire ignore-reload
refresh_pattern -i \.(html|htm|css|js)$ 1440 40% 10080
refresh_pattern .               0       20%     4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
via off
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
client_lifetime 3 hours
half_closed_clients off
snmp_access allow snmppublic localhost
snmp_access allow snmppublic snmpallowlist
snmp_access deny all
incoming_rate 40
 ipcache_size 48000
 ipcache_low 93
 ipcache_high 95
 fqdncache_size 10240
memory_pools_limit 100 MB
forwarded_for off
client_db off
coredump_dir /usr/local/squid/var/cache
pipeline_prefetch off
zero_buffers off

storeurl.pl:

#!/usr/bin/perl
$|=1;
while (<>) {
    @X = split;
        $x = $X[0];
        $_ = $X[1];

if (m/^http:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com).*?\&(itag=[0-9]*).*?\&(id=[a-zA-Z0-9]*)/) {
        print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/" . $2 . "&" . $3 . "\n";

} else {
        print $x . $_ . "\n";
}
}

Any help will be much appreciated
Thanks a million

P.S
This same above mentioned configuration is working fine on 2.7 stable6

                                               
Received on Fri Aug 13 2010 - 12:06:43 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 13 2010 - 12:00:02 MDT