代码改变世界

squid封禁不带User-Agent的请求

2012-10-20 12:13  游乐场123  阅读(508)  评论(0编辑  收藏  举报

看awstats分析报表 很多请求不带User-Agent头
Unknown robot (identified by empty user agent string)
于是就封禁了 加两行squid配置
acl has_ua browser .+
http_access notfound !has_ua

其中notfound 可以用deny 这里是改过的 status = HTTP_NOT_FOUND
page_id = ERR_INVALID_URL ERR_INVALID_URL 也是改过的
<TITLE>404 Not Found</TITLE>


版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。
http://windtear.net/2008/08/squid_deny_empty_user-agent.html