[squid-users] redirect_program and redirect_access: What am I doing wrong?

From: Yuriy Romanenko <yromanenko@dont-contact.us>
Date: Fri, 31 May 2002 16:27:50 -0700

Hi, and thanks for your help in advance.
 
Ok, I'm trying to get the URL redirect working(more like use statistics
for certain computers) on my squid 2.4STABLE6
And it seems to not work. No error messages as far as I can tell, but
not working.
 
 
From /usr/local/squid/etc/squid.conf
 
acl mainbox src 192.168.0.2
 
(I tried 192.168.0.2/32 and 192.168.0.2/255.255.255.0, same results)
 
 
redirect_program /usr/local/squid/bin/access.pl
 
 
(this works when I run at from the console and creates the appropriate
file)
 
 
redirector_access allow mainbox
 
 
 
Squid generally works but nothing appears in /var/log/access when you
browse from 192.168.0.2.
I can ps -eax and see that /usr/local/squid/bin/access.pl is launched
twice(just like I said in squid.conf)
But it's "TIME" doesn't change.. it sorta remains idle, even though
192.168.0.2 is actively using the proxy.
 
 
 
(This is on Openbsd 3.1 btw).
 
 
What gives?
 
Thank you very much.
 
 
 
 
My /usr/local/squid/bin/access.pl script
--------------------------------------------------------
#!/usr/bin/perl
 
require "ctime.pl";
 
$|=1;
 
while(<>)
{
        $t = $_;
        $time = &ctime(time);
        open(LOG,'>>/var/log/access);
        print LOG $time;
        print $t;
        close(LOG);
}
 
 
 
 
Received on Fri May 31 2002 - 17:30:41 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:08:18 MST