[squid-users] Squid reverse proxy with cache.

From: Morgan Storey <me_at_morganstorey.com>
Date: Mon, 21 Mar 2011 19:44:41 +1100

Hi Everyone,

Setting up a reverse caching proxy with Squid on windows 2003
(unfortunately) in a lab for a proof of concept. Using 2.7.STABLE8.
Never done this on windows so be kind.
The reverse proxy works to any of the sites on the webserver, but if I
turn off the webserver and attempt to get to the sites via the proxy's
cache it times out (to test a failure of the webserver).

I have a separate Squid reverse proxy and a separate IIS6 web server
running an application called Umbraco.

I have done a fair bit of googling but can't find the answer, I mainly
have used the guides below as well as a bit from the squid
documentation.
http://ashleyangell.com/2009/03/configuring-a-basic-reverse-proxy-in-squid-on-windows-website-accelerator/
http://www.mnot.net/blog/2007/12/12/stale
http://www.howtoforge.com/how-to-set-up-a-caching-reverse-proxy-with-squid-2.6-on-debian-etch

Here are the two squid.conf's I have tried (mashed together from my
meagre knowledge and the above): http://pastebin.com/L9EjafJW
http://pastebin.com/QS6kxUwN

I have also played with the cache control setting in IIS, but it
doesn't appear right (two Cache-control entries?), I get the below if
I wget the index on the webserver
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Cache-Control: public, max-age=5,stale-while-revalidate=600,
stale-if-error=36000
Set-Cookie: ASP.NET_SessionId=fdlkjayuf98dsfgnkjdsl7; path=/; HttpOnly
Cache-Control: private

I have tried this via the suggestion here,
http://support.microsoft.com/kb/247404 which edits the IIS metabase to
add the CacheControlCustom entry, but this doesn't seem to change the
headers. So I added a custom header to the site which is what gives
the dual cache-control entries in the header.

Could this be to do with IIS using http:1.1 by default? I tried
setting both HcNoCompressionForHttp10 and HcNoCompressionForProxies to
FALSE as someone did here
http://objectmix.com/inetserver/285880-compression-disabling-transfer-encoding-chunks.html
to no avail.

I know this is a long shot but anyone got any ideas as to why it isn't
caching the site, it could be a simple config file snafu that someone
more knowledgeable in Squid will pickup pretty quick.
Received on Mon Mar 21 2011 - 08:44:49 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 21 2011 - 12:00:01 MDT