[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-misc
Subject: Clever Redirect
From: stewsnooze () gmail ! com (Stewart Robinson)
Date: 2010-07-26 8:32:35
Message-ID: 2DB1AF2B-355A-4866-9048-467D08EDEFB3 () gmail ! com
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic