Put basic apache authentication on squid

htpasswd /etc/squid/passwd user1
chmod o+r /etc/squid/passwd
dpkg -L squid3 | grep ncsa_auth
vi /etc/squid/squid.conf
Append (or modify) following configration directive:
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
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

Also find out your ACL section and append/modify
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users
Save and close the file.


Leave a Reply

Your email address will not be published. Required fields are marked *