🔗 使用 NCSA httpd 风格的密码文件进行身份验证
在此示例中,squid 安装将使用 NCSA 风格的密码文件来验证用户
🔗 密码文件
创建新密码文件
htpasswd -c -nbm /etqc/squid/passwords username password
添加用户
htpasswd -nbm /etc/squid/passwords username password
删除用户
htpasswd -D -nbm /etc/squid/passwords username password
![]()
-m选项指定 MD5 加密,这是 htpasswd 的默认设置
Squid helpers 支持密码文件的 DES、MD5 和 SHA 加密。Bcrypt 需要 Squid 构建所使用的加密库提供额外支持,因此可能可用也可能不可用。
🔗 Squid 配置文件
在 squid.conf 中
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwords
auth_param basic children 5
auth_param basic credentialsttl 1 minute
用于使用它的基本身份验证 ACL 控制是
acl auth proxy_auth REQUIRED
http_access deny !auth
http_access allow auth
http_access deny all
⚠️ Disclaimer: Any example presented here is provided "as-is" with no support
or guarantee of suitability. If you have any further questions about
these examples please email the squid-users mailing list.
类别: ConfigExample
导航:站点搜索,站点页面,分类,🔼 向上