RE: [squid-users] Squid only forwards GET requests to cache_peer

From: Leigh Wedding <leigh.wedding_at_bigpond.com>
Date: Tue, 10 Jan 2012 20:44:08 +1100

---- Jenny Lee <bodycare_5_at_live.com> wrote:
>
>
> > Date: Mon, 9 Jan 2012 15:53:22 +1100
> > From: leigh.wedding_at_bigpond.com
> > To: squid-users_at_squid-cache.org
> > Subject: [squid-users] Squid only forwards GET requests to cache_peer
> >
> > Hi,
> >
> > I have a problem with squid only forwarding HTTP GET requests to cache_peers. My setup is that the corporate network has no access to the Internet, access is only via corporate wide http proxies. I also have another separate network (NET2, which does not have Internet access), which has only restricted access to the corporate network via a firewall. I am running a squid proxy in NET2 which should connect direct to various corporate WWW resources, and should connect to the corporate proxies for any WWW resources on the Internet. This all works fine for HTTP GET requests. However for HTTP HEAD requests (eg. needed for wget -N), it does not work for WWW resources on the Internet; Squid always tries to handle HEAD requests directly, it does NOT forward them to the defined cache_peers. I have 8 cache_peers defined as follows:
> >
> > cache_peer 10.97.216.133 parent 8080 0 no-query round-robin
> > cache_peer 10.97.216.136 parent 8080 0 no-query round-robin
> > cache_peer 10.97.216.139 parent 8080 0 no-query round-robin
> > cache_peer 10.97.216.142 parent 8080 0 no-query round-robin
> > cache_peer 10.97.217.133 parent 8080 0 no-query round-robin
> > cache_peer 10.97.217.136 parent 8080 0 no-query round-robin
> > cache_peer 10.97.217.139 parent 8080 0 no-query round-robin
> > cache_peer 10.97.217.142 parent 8080 0 no-query round-robin
> >
> > Can anyone shed any light on what might be the problem, and what I can do to fix it?
> >
> > I am running squid 2.7.STABLE5 on SUSE Linux Enterprise Server 11 (x86_64) PL1.
> >
> > Thanks,
> > Leigh.
> >
>
> nonhierarchical_direct off
>
> should fix it for you.
>
> Jenny

Thanks Jenny. The nonhierarchical_direct documentation actually referred me
to never_direct (and hence always_direct) which provided an example of
exactly what I needed. The problem is now fixed.

I thought it would be a simple solution, I just needed pointing in the right direction.

Thanks,
Leigh.
Received on Tue Jan 10 2012 - 09:44:16 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 10 2012 - 12:00:02 MST