Re: [squid-users] How can I get a separated logifle of denied URL by acl?

From: OSUMI Yusuke <ozuma5119_at_nifty.com>
Date: Thu, 22 Aug 2013 23:03:57 +0900

Thanks Amos!
I got a exactly logfile what I want with below squid.conf:

-------------------
acl blacklist_regex url_regex "/usr/local/squid/etc/blacklist.txt"
http_access deny blacklist_regex
...
...
access_log /var/log/squid/access.log squid
access_log /var/log/squid/deny.log squid blacklist_regex
-------------------

OSUMI Yusuke

(13/08/22 11:58), Amos Jeffries wrote:
> On 22/08/2013 2:01 a.m., OSUMI Yusuke wrote:
>> Hi,
>>
>> I'm using squid 3.1 to block HTTP requests by my customized URL blacklists.
>>
>> squid.conf:
>> -------------------
>> acl blacklist_regex url_regex "/usr/local/squid/etc/blacklist.txt"
>> http_access deny blacklist_regex
>> -------------------
>>
>> Then, I want to get blocked requests from a logfile.
>> Because my "access.log" is too large, I want to get a separated logfile
>> which only include blocked requests by above 'url_regex' setting.
>> (e.g.. I want to get "access.log" and "cache.log", and also want to get
>> "deny.log")
>>
>> Any idea?
>
> Use a second access_log line.
> http://www.squid-cache.org/Doc/config/access_log/
>
> Amos
>
Received on Thu Aug 22 2013 - 14:04:14 MDT

This archive was generated by hypermail 2.2.0 : Thu Aug 22 2013 - 12:00:10 MDT