squid代理配置帐号密码验证

本文参考:https://www.cnblogs.com/operaculus/p/5705184.html,根据做者实际状况所做修改。html

安装好squidbash

# yum install squid

Squid实现用户名密码,使用HTTPBasicAuth 的方式。 须要htpasswd命令工具来建立passwd文件 安装Apache软件,此工具会附带安装。ide

使用 yum whatproviders command-name  能够得知该命令有在哪些软件包。工具

# yum whatproviders htpasswd

2. 将下述代码添加到/etc/squid/squid.conf 中即配置实用验证的功能:ui

auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
acl auth_user proxy_auth REQUIRED
http_access allow auth_user

3,验证方式 squid 的安装文件会自带,须要 正确的路径, Squid 3.5的文件是 : /usr/lib64/squid/basic_ncsa_auth spa

# systemctl restart squid
相关文章
相关标签/搜索