用户工具

站点工具


linux:squid

这是本文档旧的修订版!


Squid

Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages.

Installation

yum install squid
 
systemctl start squid

HTTP basic authenication

touch /etc/squid/passwd && chown squid /etc/squid/passwd
htpasswd /etc/squid/passwd [username]

Edit /etc/squid/squid.conf:

/etc/squid/squid.conf
auth_param basic program /usr/lib64/squid/basic_ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid Basic Authentication
auth_param basic credentialsttl 2 hours
acl auth_users proxy_auth REQUIRED
http_access allow auth_users

And reload squid:

systemctl reload squid

Reference

linux/squid.1516592733.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)