Clever Redirect
Stewart Robinson
stewsnooze at gmail.com
Mon Jul 26 10:32:35 CEST 2010
Hi,
You would probably have each backend defined
backend a_particular_backend {
.host = "74.200.73.185";
.port = "81";
}
backend a_spectacular_backend {
.host = "74.200.73.186";
.port = "81";
}
Then you could probably do something in the vcl_recv function
for instance
sub vcl_recv {
if ( req.url == "a_particular_backend") {
set req.backend = a_particular_backend;
set req.url = "/somepage.xml";
} else if (req.url == "a_spectacular_backend") {
set req.backend = a_spectacular_backend;
set req.url = "/somepage.xml";
}
e.t.c.
Will this work?
Stew
On 26 Jul 2010, at 07:40, Stephen Nelson-Smith wrote:
> Hello,
>
> I might be trying to do this entirely the wrong way, but here's the plan:
>
> I have a large number of machines on a private VLAN, behind a
> firewall, and without publicly routeable IP addresses. I want to be
> able to hit a page (the same page) on each of them, from a known,
> remote location. I don't wish to set up 90 different IPs on the
> external firewall. What I thought I could do was something like this:
>
> * Have varnish listening on a machine with an external IP address.
> * Hit http://varnish-server.com/$servername
> * Have varnish go to http://$servername/mypage.xml and return it to
> the initial requestor
>
> I have this working with a nasty cgi script, but it seems to me as if
> this could be done via Varnish. Am I right? If so, how would I go
> about it?
>
> Thanks,
>
> S.
>
> --
> Stephen Nelson-Smith
> Technical Director
> Atalanta Systems Ltd
> www.atalanta-systems.com
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
More information about the varnish-misc
mailing list