logformat httpd %>a %[ui %[un [%tl] “%rm %ru HTTP/%rv” %>Hs %<st “%{Referer}>h” “%{User-Agent}>h” %Ss:%Sh
access_log /var/log/squid/access.log httpd
forwarded_for on
acl has-xff req_header X-Forwarded-For ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9a-f]+)?:([0-9a-f:]+)?:([0-9a-f]+|0-9\.]+)?\]))
# add logging for PLURA
logformat combinedjson {“Remote-addr”: “%>a”, “X-forwarded-for”: “%{X-Forwarded-For}>h”, “Request-date”: “%tl”, “Method”: “%rm”, “Request”: “%rm %rp HTTP/%rv”, “Host”: “%>rd”, “Uri”: “%ru”, “Resp-Content-Type”: “%mt”, “Refere”: “%{Referer}>h”, “User-Agent”: “%{User-Agent}>h”, “Status”: “%>Hs”, “Resp-Content-Length”: “%<st”, “ProxyStatus”: “%Ss:%Sh”}
#access_log /var/log/squid/access.log combinedjson
access_log stdio:/var/log/plura/weblog.log combinedjson !has-xff
access_log stdio:/var/log/plura/weblog.log combinedjson has-xff
echo “ModPlura-squid” > /etc/modplura
echo “0.0.1” >> /etc/modplura
touch /var/log/plura/weblog.log
chmod -R 766 /var/log/plura/weblog.log
chcon -t squid_log_t /var/log/plura/weblog.log