Install Squid 3 on uBuntu

#apt-get install squid3

Edit your squid.conf in /etc/squid3/squid.conf

http_port xxxx transparent #change xxxx with port number
cache_mgr Spearcross
visible_hostname Spearcross.net
cache_mem 64 MB
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %h" "%{User-Agent}>h" %Ss:%Sh
access_log /var/log/squid3/access.log squid
cache_store_log none
cache_log /var/log/squid3/cache.log

acl apache rep_header Server ^Apache

cache_dir ufs /var/spool/squid3 5000 8 256
#For cache_dir use this formula
#(((x / y) / 256) / 256) * 2 = # Directory number
#example: you allocating 2GB for cache and 20KB average object size
#(((5.000.000 / 20) / 256) / 256) * 2 = 8
#so you write cache_dir like this
#
#cache_dir 5000 8 256

maximum_object_size 4194240 KB
maximum_object_size_in_memory 512 KB
negative_ttl 2 minutes half_closed_clients off

For Anonymous Proxy :

forwarded_for off
request_header_access Allow allow all
request_header_access Authorization allow all
request_header_access WWW-Authenticate allow all
request_header_access Proxy-Authorization allow all
request_header_access Proxy-Authenticate allow all
request_header_access Cache-Control allow all
request_header_access Content-Encoding allow all
request_header_access Content-Length allow all
request_header_access Content-Type allow all
request_header_access Date allow all
request_header_access Expires allow all
request_header_access Host allow all
request_header_access If-Modified-Since allow all
request_header_access Last-Modified allow all
request_header_access Location allow all
request_header_access Pragma allow all
request_header_access Accept allow all
request_header_access Accept-Charset allow all
request_header_access Accept-Encoding allow all
request_header_access Accept-Language allow all
request_header_access Content-Language allow all
request_header_access Mime-Version allow all
request_header_access Retry-After allow all
request_header_access Title allow all
request_header_access Connection allow all
request_header_access Proxy-Connection allow all
request_header_access User-Agent allow all
request_header_access Cookie allow all
request_header_access All deny all

Restart your Squid3

/etc/init.d/squid3 restart

1 thought on “Install Squid 3 on uBuntu

  1. Really like your web sites details! Undoubtedly an exquisite offer of knowledge that’s extraordinarily helpful. Keep on to carry publishing and that i’m gonna proceed studying by means of! Cheers.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.