| |
|
|
|
 |
|
|
 |
|
| |
Howtos - Configuring Squid as an Http AcceleratorThere seems to be relatively little documentation on how to do this properly, so below is a working config
- NOTE: this can NOT be done via webconfig. You must "hand-edit" your /etc/squid/squid.conf file.
Rational:
- Visit http://www.squid-cache.org/Doc/Users-Guide/detail/accel.html for reasons why you might want to do this.
- My main reason is because I chose to install Clarkconnect Professional 3.1, but I installed it as a "standalone" server in my DMZ and NOT as a gateway. I wanted to offer web services, but did NOT want to install Apache on it. I believe using Squid should offer superior performance and enhanced security.
squid.conf :
# Basic Squid configuration for reverse-proxy
http_port <this-box-ip>:80
httpd_accel_host <the-apache-box-ip>
httpd_accel_port 80
httpd_accel_uses_host_header on
redirect_rewrites_host_header off
# The redirect below to squirm
# allow to "rewrite" specific URLs upon request.
# Basically it's "mod_rewrite" for squid.
# I compiled squirm from source on another CC31 box
# and copied the binary to the DMZ host
# There are no working rpms for squirm that I could find.
# A CC3.x binary in tgz form is available from downloads.whw3.com
# If you choose to download and install it you can uncomment the lines below.
# You should, however, read the squirm docs prior to doing this.
# redirect_program /usr/local/sbin/squirm
# redirect_children 6
# Access Control
acl self_port port 80
acl self_dst dst <cc-box-ip>
acl valid_domains dstdomain "/etc/squid/valid_domains"
acl all src 0/0
http_access deny !self_port
http_access allow valid_domains
log_icp_queries off
cachemgr_passwd super-secret-squirrel-passwd all
buffered_logs on
connect_timeout 2 seconds
request_timeout 2 seconds
cache_mgr webmaster
cache_effective_user squid
cache_effective_group squid
cache_mem 16 MB
cache_dir ufs /var/spool/squid 200 16 256
# you COULD log using squid's default format,
# but in this case I choose NOT to do that
emulate_httpd_log on
# I log referers so I can check for things like search engine referals,
# you may or may not want to do this.
referer_log /var/log/squid/referer.log
visible_hostname www
httpd_accel_with_proxy off
httpd_accel_single_host on
cache_replacement_policy heap GDSF
memory_replacement_policy heap GDSF
/etc/squid/valid_domains :
domain1.com
www.domain1.com
domain2.com
www.domain2.com
|
|
|