Squid configuration user password login proxy server

Squid implements username and password login verification, which can use HTTPBasicAuth. The htpasswd tool is required to create passwd files.

Configure the basic_ncsa_auth authentication method.
For example, under this path /usr/lib64/squid/basic_ncsa_auth,
add the following content in the /etc/squid/squid.conf file:

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

1. htpasswd generates passwd file and creates user

htpasswd -c /etc/squid/passwd proxy_username
After entering the corresponding password, generate the file /etc/squid/passwd

2. htpasswd create user

htpasswd -c /etc/squid/passwd proxy_username

restart squid
#systemctl restart squid

Guess you like

Origin blog.csdn.net/sukeeeeeeeee/article/details/62893242