且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CentOS6.2下64位squid 透明代理配置过程

更新时间:2022-09-16 15:05:08

yum install squid 
 
 
在 /etc/squid/passwd 中写入:
test:cuUEnEwyMTcGY
帐号test密码:1234
 
 
vi /etc/squid/squid.conf
 
http_port 3128
#icp_prot 3130
cache_dir ufs /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/run/squid.pid
#auth_param basic children 5
#auth_param basic realm Squid proxy-caching web server
#auth_param basic credentialsttl 2 hours
#http_access allow all
cache_effective_user squid
cache_effective_group squid
cache_mgr ppabc@126.com
visible_hostname feng-squid
auth_param basic program  /usr/lib64/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic credentialsttl 2 hours
acl auth_user proxy_auth REQUIRED
http_access allow auth_user
http_access deny all
 
 
32位使用
auth_param basic program  /usr/lib/squid/ncsa_auth /etc/squid/passwd
64位使用
auth_param basic program  /usr/lib64/squid/ncsa_auth /etc/squid/passwd
 
 
 
 本文转自 ppabc  51CTO博客,原文链接:http://blog.51cto.com/ppabc/990941