SQUID动态URL日志不完整的问题

SQUID 2.6.STABLE6
logformat combined %>a %ui %un [%tl] "%rm %ru  HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh %tr
access_log /home/squid/log/access.log combined

问题:
访问的URL为:http://www.hiadmin.com/xxx.php?codetin=pig时:
日志为:
222.68.179.90 - - [18/Oct/2008:00:52:00 +0800] "GET http://www.hiadmin.com/xxx.php?  HTTP/1.1" 304 299 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)" TCP_IMS_HIT:NONE 0

URL后面的:codetin=pig 丢失了。

解决方法:
在squid.conf中添加:
strip_query_terms off

重新reload squid,日志正常。

strip_query_terms
默认为开启。是为了保护用户的隐私,而不在日志中记录“?”后面的参数

原文地址:https://www.cnblogs.com/studio313/p/1639361.html