Debian – How to exclude a particular domain entry from access.log in squid3 on debian

debiandomainloggingPROXYsquid

I have proxy server setup running squid proxy and Squid Cache: Version 3.1.20 on debian, I am doing some log analysis from squid's log file i.e /var/log/squid3/access.log. I dont want a entry of domain abc.com in access.log. any client which browses abc.com the log information of abc.com should be excluded from access.log
What are the changes in squid configuration to achieve this ?

Best Answer

Create an ACL for the domain(s) you want to exclude from the log :

acl exclude dstdomain abc.com

For multiple domains you can use a separate file, and have one domain per line in it :

acl exclude dstdomain "/etc/squid/excluded.txt"

Then, disable logging for that ACL :

access_log none exclude
Related Topic