debian 7 上安装 squid 及配置过程
Nov082016
安装 squid
apt-get update && apt-get install squid3 备份原始配置文件
cp /etc/squid3/squid.conf /etc/squid3/squid.conf.bak
创建密码验证:
user1 可以修改成自己先要的用户名。
htpasswd -c /etc/squid3/squid_passwd user1
编辑配置文件 /etc/squid3/squid.conf
我的配置文件为 # # Recommended minimum configuration: # acl manager proto cache_object acl localhost src 127.0.0.1/32 ::1 acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1 http_port 3124 cache_mem 64 MB maximum_object_size 4 MB minimum_object_size 0 KB maximum_object_size_in_memory 4096 KB cache_dir ufs /var/spool/squid3 4048 16 256 access_log /var/log/squid3/access.log auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/squid_passwd acl ncsa_users proxy_auth REQUIRED http_access allow ncsa_users visible_hostname squid3 # Add any of your own refresh_pattern entries above these. refresh_pattern ^ftp: 1440 20% 10080 refresh_pattern ^gopher: 1440 0% 1440 refresh_pattern -i (/cgi-bin/|\?) 0 0% 0 refresh_pattern . 0 20% 4320 最后重启 squid3 服务
/etc/init.d/squid3 restart
完成