On Mon, 28 Mar 2011 11:27:16 -0400, David Guertin wrote:
On 2011-03-22 17:25, Amos Jeffries wrote:
Thepreferred alternative is cache_peer link(s) to the origin
server(s) or app(s). Squid 'tests" these during each connection setup
and can failover between several of them or 'DIRECT' Internet DNS
details as needed.
Usage is detailed under reverse-proxy where they are commonly used:
http://wiki.squid-cache.org/ConfigExamples/Reverse/BasicAccelerator
Thanks, this has helped a lot, and I'm much closer now. However, now
I'm running into other limitations of my Squid knowledge. Following
the example of that link, my cache_peer statements are working
correctly for the site I'm interested in, i.e. URLs of the form
<mysite.com>/somepage.html are cached. However, URLs to any other
site, i.e <someothersite.com>/index.html are also all getting caught
and are failing, because Squid is converting them to
"<mysite.com>/index.html". In other words, I haven't yet found out
how
to catch only requests for a single domain.
Here's the head of my config file:
http_port 80 accel defaultsite=<mysite.com>
cache_peer <mysite.com> parent 80 0 no-query originserver
name=myAccel proxy-only
acl proxy_sites dstdomain <mysite.com>
acl all src 0.0.0.0/0.0.0.0
http_access allow proxy_sites
cache_peer_access myAccel allow proxy_sites
cache_peer_access myAccel deny all
I have tried other configuration as well, including additional
cache_peer statements, but nothing I've tried has worked. The
requests
don't fail over to the other cache_peer statements.
What am I missing?
You've just reached the next level of complexity :)
Basic reverse-proxy assumes that all traffic arriving at the port is
for one website (the defaultsite=...).
Add the "vhost" option to http_port to enable virtual hosting support
for multiple domains.
Amos