I've built a storeurl_rewrite_program (which strips some changing
query-strings), and verified from logging in the script that it is
being run and generating the desired modified url. However, access.log
continues to show TCP_MISS and store.log has SWAPOUT with the
unmodified url.
Why would Squid run the rewriter and then throw away the result?
Edits to stock squid.conf:
+cache_dir ufs /tmp/squid 100 16 256
+access_log /tmp/squid/logs/access.log squid
+cache_log /tmp/squid/logs/cache.log
+cache_store_log /tmp/squid/logs/store.log
+pid_filename /tmp/squid/squid.pid
+storeurl_rewrite_program /path/to/storeurl.pl <http://storeurl.pl>
<http://storeurl.pl>
+acl storeurl_rewrite_list dstdomain api.meetup.com
<http://api.meetup.com> <http://api.meetup.com>
+storeurl_access allow storeurl_rewrite_list
+storeurl_access deny all
+cache allow all
+refresh_pattern api.meetup.com <http://api.meetup.com>
<http://api.meetup.com> 1440 90%
14400 ignore-no-cache
override-expire ignore-private
#!/opt/local/bin/perl
$|=1;
while (<>) {
@X = split;
$url = $X[0];
open(LOG,">>/tmp/squid/logs/rewrite.log") || die("Log file will not
open");
print LOG ">".$url."\n";
if ($url =~
s@^http://api\.meetup\.com(.*)callback=jsonp[0-9]+&_=[0-9]+&@http://api.meetup.com$1@)
{$url = 'foo';}
print LOG "<".$url."\n";
close(LOG);
print $url . "\n";
}
Received on Wed Mar 17 2010 - 12:04:35 MDT
This archive was generated by hypermail 2.2.0 : Wed Mar 17 2010 - 12:00:04 MDT