fre 2006-12-29 klockan 09:49 -0600 skrev King, John (Greg) (LMIT-HOU): > Thanks for the help. It is not working and I am unsure of the cause but > I am trying to locate the problem. > > When this line is entered in the external_acl_type it fails to run with > an error > > external_acl_type whitelist children=1 concurrency=1024 %DST > /scripts/whitelist.pl acl do_whitelist external whitelist OK acl > is_whitelisted external whitelist CHECK
It's not one line, it's three lines.. one external_acl_type, and two acl
lines... somwehere the linewraps got munged..
> 2006/12/29 02:40:46| WARNING: whitelist #1 (FD 6) exited
Ouch.. it should not exit. And there was no sign why it exited.. odd.
Seems to work for me after some trivial corrections, mainly removing the
-l option from perl and squid.conf spelling corrections.
### whitelist.pl ###
#!/usr/bin/perl -w
use strict;
$|=1;
my %whitelist = ();
while(<>) {
my ($id, $site, $action) = split();
my $ret = "ERR";
if ($action eq "OK") {
$whitelist{$site} = 1;
}
$ret = "OK" if $whitelist{$site};
print "$id $ret\n";
}
### END ###
### squid.conf ###
external_acl_type whitelist negative_ttl=1 children=1 concurrency=1024 %DST
/home/henrik/squid/bin/whitelist.pl
acl do_whitelist external whitelist OK
acl is_whitelisted external whitelist CHECK
acl whitelist referer_regex ^http://whitelistig.site
http_access allow is_whitelisted
http_access allow whitelist do_whitelist
http_access deny all
### END ###
Regards
Henrik
signature.asc
Description: Detta är en digitalt signerad meddelandedel
