# touch /etc/squid/passwd
# chown squid /etc/squid/passwd
# htpasswd -d /etc/squid/passwd lsps
# vi /etc/squid/squid.conf
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd# systemctl restart squid
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
#下面這行放在 acl 最前面
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users
沒有留言:
張貼留言