SQUID动态URL日志不完整的问题
SQUID 2.6.STABLE6logformat combined %>a %ui %un [%tl] "%r...
扫描右侧二维码阅读全文
17
2008/10

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

SQUID 2.6.STABLE6

logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %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
默认为开启。是为了保护用户的隐私,而不在日志中记录“?”后面的参数。

Last modification:November 26th, 2018 at 04:16 pm
If you think my article is useful to you, please feel free to appreciate

2 comments

  1. alex

    codetin=pig.... -.-

  2. Michael Field

    这个应该不属于问题吧~
    只是默认设定比较符合人性化!

Leave a Comment