首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Squid deny_info https不工作

Squid deny_info https不工作
EN

Unix & Linux用户
提问于 2021-10-17 09:24:02
回答 1查看 453关注 0票数 0

我在centos 8上配置了squid代理服务器,工作正常,我通过squid阻止了一些站点,当任何人访问被封锁的url时,它只是显示页面浏览器不能打开页面。我只想ERROR_ACCESS。下面是我的配置。

代码语言:javascript
复制
acl localnet src 200.200.200.0/24
acl localnet src 172.30.0.0/16

acl SSL_ports port 443
acl Safe_ports port 80      # http
acl Safe_ports port 21      # ftp
acl Safe_ports port 443     # https
acl Safe_ports port 70      # gopher
acl Safe_ports port 210     # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280     # http-mgmt
acl Safe_ports port 488     # gss-http
acl Safe_ports port 591     # filemaker
acl Safe_ports port 777     # multiling http
acl CONNECT method CONNECT

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

http_access allow localhost manager
http_access deny manager

acl badsite url_regex "/etc/squid/block"
http_access deny badsite all
deny_info ERR_ACCESS_DENIED badsite

http_access allow localnet
http_access allow localhost

http_access deny all

http_port 3128
cache_dir ufs /var/spool/squid 100 16 256

coredump_dir /var/spool/squid

refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .       0   20% 4
EN

回答 1

Unix & Linux用户

发布于 2022-06-01 16:50:42

请在您的squid.conf中添加以下内容。这应该能解决这个问题

代码语言:javascript
复制
error_directory /usr/share/squid/errors/en/
deny_info ERR_ACCESS_DENIED badsite
票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/673553

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档