首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
Install Squid3 Proxy @ Ubuntu 12.04/14.04
Type(Type) 2013/5/2 19:39

1. Get/Install SQUID3

代碼:
$ sudo apt-get install squid3 $ sudo service squid3 stop

2. Setup SQUID3 user password

代碼:
$ sudo htpasswd -c /etc/squid3/passwd <proxy-user-name>$ sudo cat /etc/squid3/passwd    (To check if it created already)$ sudo chmod 644 /etc/squid3/passwd

3. Find out NCSA_AUTH handle program location

代碼:
$ sudo dpkg -L squid3 | grep ncsa_auth/usr/lib/squid3/ncsa_author/usr/lib/squid3/basic_ncsa_auth



4. Setup Basic auth_param

@ /etc/squid3/squid.conf Search "Examples:", and umcomment "basic auth example"replace "" with "/usr/lib/squid3/ncsa_auth /etc/squid3/passwd"orwith "/usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwd"
代碼:
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/passwdorauth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwdauth_param basic children 5auth_param basic realm Squid proxy-caching web serverauth_param basic credentialsttl 2 hours

5. Setup ACL

@ /etc/squid3/squid.conf Search "And finally deny all"Put these two ACL rules before that
代碼:
acl ncsa_auth_users proxy_auth REQUIREDhttp_access allow ncsa_auth_users

6. (Optional) Do other setup/performance tuning

@ /etc/squid3/squid.conf e.g. Make memory pool larger
代碼:
memory_pools_limit 64 MB
e.g. Skip X-Forwarded-For Header代碼:
forwarded_for delete

8. Finally Startup the squid3

代碼:
$ sudo service squid3 restart


(2,807 views)
[更多討論] 討論區 Windows, Linux, Perl, PHP, C/C++, Driver, Web 理論、應用、硬體、軟體


"Install Squid3 Proxy @ Ubuntu 12.04/14.04" 傳統頁面(電腦版)

首頁 繪圖設計 工作閒聊 比賽活動 美術討論 標籤 圖片
傳統桌面版
© Vovo2000.com Mobile Version 小哈手機版 2019