All pastes #988563 Raw Edit

Untitled

public text v1 · immutable
#988563 ·published 2008-04-17 18:38 UTC
rendered paste body
# squid listens on the loopback and on
# the internal interface (3128 port)
http_port 127.0.0.1:3128
http_port 172.16.50.63:3128

# Disable ICP and HTCP queries to/from neighbor caches.
# These features are needed only in a multi-level cache
# environment with multiple siblings and parent caches
icp_port 0
htcp_port 0

# Words defined in this tag when matched in the URLs,
# directs squid not to query caches.
# For example dynamic content - php or asp pages.
hierarchy_stoplist cgi-bin ? php asp
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

# Specify the amount of RAM, to be used for caching the
# so called: In-Transit objects, Hot Objects,
# Negative-Cached objects.
cache_mem 16 MB

# If a file size is less than - 100 MB,
# squid will place it in cache
maximum_object_size 100 MB

# Define the path to cache directory where all objects which
# are to be cached are stored:
# 1024 - is the amount of disk space (MB)
# to use under /var/cache/squid directory
# 16 - is the number of first-level subdirectories
# which will be created under the
# /var/cache/squid directory
# 256 - is the number of second-level
# subdirectories which will be created under
# each first-level directory
cache_dir ufs /var/cache/squid 1024 16 256

# Log client request activities to the
# /var/log/squid/access.log file using the squid log format
access_log /var/log/squid/access.log squid

# Define access control lists
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/32
acl manager proto cache_object
acl ssl_ports port 443
acl ftp_ports port 21
acl www_ports port 80 443
acl CONNECT method CONNECT
acl PURGE method PURGE

# Recommended minimum configuration:
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow PURGE localhost
http_access deny PURGE
# Deny requests to unknown ports
http_access deny !www_ports !ftp_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !ssl_ports

# Rules for our clients
acl video4admin_proxy_users src 172.16.50.0/23
http_access allow video4admin_proxy_users

# Allow the localhost to have access by default
http_access allow localhost

# And deny all other access to this proxy
http_access deny all

# Prevent users from downloading very large files
# (limit to ~100MB)
reply_body_max_size 102400000 allow all

# Supply an e-mail where users can send their remarks
# or problems regarding squid
cache_mgr root@proxy.video4admin.com

# Define the hostname that will be shown in
# error messages etc.
visible_hostname proxy.video4admin.com

# Specify the UID/GID that the squid will run on
cache_effective_user squid
cache_effective_group squid

# Squid has a built in feature for the rotation of the logs.
# But I prefer logrotate
logfile_rotate 0

# Speed up the writing of some log files
buffered_logs on