Search squid archive

Need help with Squid reverse proxy with mirrored parents please!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hiya Squid Users - So I'm trying to configure Squid as a reverse
proxy, listening on port 80, in front of two web servers.  One web
server runs on the localhost and listens on port 81 and contains a
subset of all website content.  Then the second web server is a remote
box, listening on port 80, with a full set of all content.

What I'd like Squid to do is act as a single front-end for these
servers.  A request comes in, and if it's a cache miss, it should
first ask the localhost web server if it can satisfy the request.  If
so, it serves it up.  If not, it should forward it on to the second
web server.

Following the guide here:
http://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers,
I've come up with the following config:

http_port 80 accel defaultsite=localhost
cache_peer localhost parent 81 0 originserver name=local
cache_peer example.com parent 80 0 originserver name=remote
acl request dstdomain localhost
cache_peer_access local allow request
cache_peer_access remote allow request

(I have other ACLs unrelated to this config, such as allowing http
requests on port 80).

The problem I run into is that a miss on the localhost web server (an
HTTP 404) isn't properly forwarded on to the remote server - squid
only ever tries a single parent.  If I remove the localhost peer, the
request is properly forwarded, and I get back the expected HTTP 200.

What am I missing in my config to make it do that?

Thanks,
Alex




[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux