Re: [squid-users] Re: Youtube Changes

2013-04-24 Thread Odhiambo Washington
I am following this thread closely since inception and wanted to test
this on my squid 2.7.9.
However I am getting a problem with the second refresh_pattern regex.

2013/04/24 15:37:36| parse_refreshpattern: Unknown option
'(get_video\?|videoplayback\?|videodownload\?|\.flv\?|\.fid\?)':
ignore-must-revali..

On 24 April 2013 04:35, syaifuddin ucok_karn...@yahoo.com wrote:
 ragheb68 wrote
 Hi syaifuddin,

 Trying to implement the changes you proposed on squid 2.7stable 9. Got
 confused there is nothing in your email concerning refresh patterns and
 other old youtube settings in squid.conf should all of them be removed and
 replaced with new ones or just add the new acls along with the old ones. I
 have currently installed File::Readbackwards Perl module on fedora 13 and
 added your lines to my already old squid.conf with old youtube among other
 settings and replaced the old storeurl.pl with yours but still I can see
 TCP_MISS on all youtube requests in access.log file. Any ideas what could
 be the cause?

 strip_query_terms off
 acl yutub dstdomain .youtube.com .youtu.be
 logformat squid1 %{Referer}h %ru
 access_log /var/log/squid/yt.log squid1 yutub
 acl redirec urlpath_regex -i redirect_counter=1cms_redirect=yes
 ir=1rr=12
 acl videocache url_regex -i \.(youtu|google).*\.com\/videoplayback
 storeurl_access deny redirec
 storeurl_access allow videocache
 storeurl_rewrite_program /etc/squid/storeurl.pl
 storeurl_rewrite_children 1
 storeurl_rewrite_concurrency 10
 cache deny redirec

 refresh_pattern ^.*youtube\.com\.SQUIDINTERNAL.*$ 43200 99% 43200
 override-expire ignore-reload ignore-no-cache ignore-private negative-ttl=0
 refresh_pattern
 (get_video\?|videoplayback\?|videodownload\?|\.flv\?|\.fid\?) 43200 99%
 43200 override-expire ignore-reload ignore-must-revalidate ignore-no-cache
 ignore-private negative-ttl=0




 --
 View this message in context: 
 http://squid-web-proxy-cache.1019090.n4.nabble.com/Youtube-Changes-tp4659599p4659620.html
 Sent from the Squid - Users mailing list archive at Nabble.com.



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
I can't hear you -- I'm using the scrambler.


Re: [squid-users] Re: Youtube Changes

2013-04-24 Thread Odhiambo Washington
This doesn't seem to work for me - so far. Here is what I have added
to squid.conf:

strip_query_terms off
acl yutub dstdomain .youtube.com .youtu.be
logformat squid1 %{Referer}h %ru
access_log /usr/local/squid/logs/yt.log squid1 yutub
acl redirec urlpath_regex -i redirect_counter=1cms_redirect=yes ir=1rr=12
acl videocache url_regex -i \.(youtu|google).*\.com\/videoplayback
storeurl_access deny redirec
storeurl_access allow videocache
storeurl_rewrite_program /usr/local/etc/squid/scripts/storeurl.pl
storeurl_rewrite_children 1
storeurl_rewrite_concurrency 10
cache deny redirec

refresh_pattern ^.*youtube\.com\.SQUIDINTERNAL.*$ 43200 99% 43200
override-expire ignore-reload ignore-no-cache ignore-private
negative-ttl=0
refresh_pattern
(get_video\?|videoplayback\?|videodownload\?|\.flv\?|\.fid\?) 43200
99% 43200 override-expire ignore-reload ignore-no-cache ignore-private
negative-ttl=0


After making the changes and giving `-k reconfigure` to squid, the
process dies and I get the following on cache.log:

2013/04/24 17:12:26| WARNING: store_rewriter #1 (FD 7) exited
2013/04/24 17:12:26| Too few store_rewriter processes are running
FATAL: The store_rewriter helpers are crashing too rapidly, need help!

Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.036 seconds = 0.012 user + 0.024 sys
Maximum Resident Size: 6916 KB
Page faults with physical i/o: 0


My /usr/local/squid/logs/yt.log is empty

On 24 April 2013 16:22, syaifuddin ucok_karn...@yahoo.com wrote:
 Odhiambo Washington-4 wrote
 I am following this thread closely since inception and wanted to test
 this on my squid 2.7.9.
 However I am getting a problem with the second refresh_pattern regex.

 2013/04/24 15:37:36| parse_refreshpattern: Unknown option
 '(get_video\?|videoplayback\?|videodownload\?|\.flv\?|\.fid\?)':
 ignore-must-revali..


 im so sorry. i forgot to remove refresh_pattern option.

 here correct refresh_pattern


 refresh_pattern
 (get_video\?|videoplayback\?|videodownload\?|\.flv\?|\.fid\?) 43200 99%
 43200 override-expire ignore-reload ignore-no-cache ignore-private
 negative-ttl=0





 --
 View this message in context: 
 http://squid-web-proxy-cache.1019090.n4.nabble.com/Youtube-Changes-tp4659599p4659626.html
 Sent from the Squid - Users mailing list archive at Nabble.com.



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
I can't hear you -- I'm using the scrambler.


Re: [squid-users] Re: Youtube Changes

2013-04-24 Thread Odhiambo Washington
I made mine mode 755 (chmod +x  /usr/local/etc/squid/scripts/storeurl.pl)

Any idea why perl -C storeurl.pl gets stuck forever??


On 24 April 2013 17:56, syaifuddin ucok_karn...@yahoo.com wrote:
 Odhiambo Washington-4 wrote
 This doesn't seem to work for me - so far. Here is what I have added
 to squid.conf:

 2013/04/24 17:12:26| WARNING: store_rewriter #1 (FD 7) exited
 2013/04/24 17:12:26| Too few store_rewriter processes are running
 FATAL: The store_rewriter helpers are crashing too rapidly, need help!

 Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
 CPU Usage: 0.036 seconds = 0.012 user + 0.024 sys
 Maximum Resident Size: 6916 KB
 Page faults with physical i/o: 0


 My /usr/local/squid/logs/yt.log is empty


 try
 chmod 555 /usr/local/etc/squid/scripts/storeurl.pl
 and try again



 --
 View this message in context: 
 http://squid-web-proxy-cache.1019090.n4.nabble.com/Youtube-Changes-tp4659599p4659629.html
 Sent from the Squid - Users mailing list archive at Nabble.com.



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
I can't hear you -- I'm using the scrambler.


Re: [squid-users] Re: Youtube Changes

2013-04-23 Thread Amos Jeffries

On 23/04/2013 6:15 a.m., babajaga wrote:

YES: Very important:

READ IT ! :-)


How about updating the Squid wiki pages with this recent information? 
reading four pages of dense regex patterns with the odd word or two of 
documentation in the middle is not an great way to spend the evening.


http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube is a 
collaborative effort between the people interested fixing YT 
cacheability problems.


Please also correct those squid.conf settings which are documented. The 
regex patterns added to squid.conf do not need .* or .*$ on the ends.


# acl yutub url_regex -i .*youtube\.com\/.*$
# acl yutub url_regex -i .*youtu\.be\/.*$

  acl yutub url_regex -i youtu(be\.com|\.be)\/

or maybe even:
  acl yutub dstdomain .youtube.com .youtu.be

# acl redirec urlpath_regex -i 
.*redirect_counter=1cms_redirect=yes

# acl redirec urlpath_regex -i .*ir=1rr=12

  acl redirec urlpath_regex -i redirect_counter=1cms_redirect=yes 
ir=1rr=12


# acl reddeny url_regex -i 
c\.youtube\.com\/videoplayback.*redirect_counter=1.*$
# acl reddeny url_regex -i 
c\.youtube\.com\/videoplayback.*cms_redirect=yes.*$


  acl reddeny url_regex -i 
c\.youtube\.com\/videoplayback.*(redirect_counter=1|cms_redirect=yes)


Amos