install squid as proxy server
to install squid as proxy server just follow this instruction:
- wget http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE10.tar.gz
- cp squid-2.5.STABLE10.tar.gz /usr/src/
- cd /usr/src/
- tar xvzf squid-2.5.STABLE10.tar.gz
- cd squid-2.5.STABLE10
- /configure
- make
- make install
- rm -f /usr/local/squid/etc/squid.conf
- pico /usr/local/squid/etc/squid.conf, and fill it, such as under the ago save this
fill of squid.conf:
http_port 8080
tcp_outgoing_address 210.23.79.44
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin ?
no_cache deny QUERY
cache_mem 100 MB
cache_swap_low 90
cache_swap_high 95
ipcache_size 10240
ipcache_low 90
ipcache_high 95
fqdncache_size 8192
maximum_object_size 10240 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 40 KB
cache_dir ufs /usr/local/squid/var/cache 100 16 256
cache_access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
cache_store_log /usr/local/squid/var/logs/store.log
emulate_httpd_log off
log_ip_on_direct on
mime_table /usr/local/squid/etc/mime.conf
pid_filename /usr/local/squid/var/logs/squid.pid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563 # SSL
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl IP-Saya src 210.23.79.44 210.23.79.39 210.23.79.41 210.23.79.38 210.23.79.45
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow IP-Saya
http_access deny all
http_reply_access allow all
cache_mgr Gua@Domain.Com
cache_effective_user nobody
visible_hostname off
coredump_dir /usr/local/squid/var/cache
ie_refresh on
half_closed_clients off
forwarded_for off
header_access Allow allow all
header_access Authorization allow all
header_access WWW-Authenticate allow all
header_access Cache-Control allow all
header_access Content-Encoding allow all
header_access Content-Length allow all
header_access Content-Type allow all
header_access Date allow all
header_access Expires allow all
header_access Host allow all
header_access If-Modified-Since allow all
header_access Last-Modified allow all
header_access Location allow all
header_access Accept allow all
header_access Accept-Charset allow all
header_access Accept-Encoding allow all
header_access Accept-Language allow all
header_access Content-Language allow all
header_access Mime-Version allow all
header_access Retry-After allow all
header_access Title allow all
header_access Cookie allow all
header_access Set-Cookie allow all
header_access All deny all
11. chmod 777 /usr/local/squid/var/logs/
12. chmod 777 /usr/local/squid/var/
13. run squid first time : /usr/local/squid/sbin/squid -z
14. /usr/local/squid/sbin/squid &
if squid goes slow down:
- killall squid
- pico /usr/local/squid/var/logs/access.log (ererase all)
- pico /usr/local/squid/var/logs/cache.log (erase all)
- pico /usr/local/squid/var/logs/store.log (erase all)
- run back again : /usr/local/squid/sbin/squid &
May 28th, 2009 at 2:41 pm | Using
Thanks for writing, I very much liked your latest post. I think you should post more frequently, you clearly have talent for blogging!
May 28th, 2009 at 4:50 pm | Using
Thanks for writing, I very much enjoyed your most recent post. I think you should post more frequently, you obviously have natural ability for blogging!
June 23rd, 2009 at 1:11 am | Using
Ugh, I liked! So clear and positively.
AnnaHopn
June 24th, 2009 at 12:38 pm | Using
Not sure that this is true
, but thanks for a post.
Elcorin
May 30th, 2010 at 2:26 pm | Using
Nice post…Thank you for sharing some good things.