我想阻止gstatic.com网站在鱿鱼,但允许访问gstatic.com/recaptcha/*。当我在白名单上写这个的时候:
gstatic\.com/recaptcha/*它不起作用。当我写域名时:
gstatic\.com它允许访问整个网站。
squid.conf:
http_access allow manager localhost
http_access deny manager
acl bad_domain dstdom_regex "/etc/squid/block.acl"
acl good_domain dstdom_regex "/etc/squid/white.acl"
http_access deny bad_domain
http_access allow good_domain
http_access deny all发布于 2015-10-15 23:21:10
这里有三个明显的问题。
dstdom_regex只匹配URL的主机名部分,其他所有内容都被忽略--您可能需要一个url_regex或urlpath_regex。dstdom_regex "/etc/squid/white.acl"不像你想的那样做。它不加载包含一堆acls的文件。如果您想这样做,那么您需要创建一个文件,其中包含一个acl定义,并在您的include中使用squid.conf -例如,include /etc/squid/white.acl同样适用于dstdom_regex "/etc/squid/block.acl"。https://unix.stackexchange.com/questions/236408
复制相似问题