Thursday, December 9, 2010

Sample squid conf for chamera-2

http://www.linuxnix.com/2010/11/failed-to-make-swap-directory-cache-13.html


sample config for chamera2


http_port 3128
icp_port 0
acl QUERY urlpath_regex cgi-bin \?
no_cache deny query
#############Cache Memory #######################
cache_dir ufs /usr/local/squid/cache 40000 16 256
cache_effective_user squid
cache_mem 64 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 8 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
cache_replacement_policy lru
memory_replacement_policy lru
#############Cache Memory ##########################
#redirect_rewrites_host_header off
#acl projects src 10.12.0.1-10.12.0.20/32
acl localnet src 10.22.0.0
acl localhost src 10.22.0.44/255.255.255.255 127.0.0.1/255.255.255.255
#acl ipnetwork src "/etc/squid/trusted_ip.txt"
acl safe_ports port 80 443 210 119 70 21 1025-6553
acl non-safe-ports port 6881-6999
acl CONNECT method CONNECT
acl all src 0.0.0.0/0.0.0.0

############### wesite blocking ######################
# acl good url_regex "/etc/squid/squid-noblock.acl"
# http_access allow good
# acl bad url_regex "/etc/squid/squid-block.acl"
# http_access deny bad
#redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
############# Website Blocking#########################

#http_access allow projects
http_access allow localnet
http_access allow localhost
#http_access allow ipnetwork
http_access deny non-safe-ports
http_access deny !Safe_ports
http_access deny CONNECT
http_access deny all
log_icp_queries off
buffered_logs on

############# log files#########################
access_log /var/log/squid/access.log
############# log files#########################