Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Misc

Problem with custom error page

 

 

Varnish misc RSS feed   Index | Next | Previous | View Threaded


aja at danskespil

Oct 19, 2011, 1:43 AM

Post #1 of 2 (199 views)
Permalink
Problem with custom error page

Hi

I am making my own 503 error page, at most things work fine, but I would like to tell the viewer which of the 2 backends it is that gives the 503, and i can't seem to find the right variable for this. I have tried req.backend which gives (null) and some others, but no luck.


Best regards/MVH
Allan Jacobsen
Infrastruktur, IT-teknik, Danske Spil A/S
Korsdalsvej 135, 2605 Brøndby


_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


audun at ytterdal

Oct 19, 2011, 1:57 AM

Post #2 of 2 (210 views)
Permalink
Re: Problem with custom error page [In reply to]

On Wed, Oct 19, 2011 at 10:43 AM, Allan Jacobsen <aja [at] danskespil> wrote:
> Hi
>
> I am making my own 503 error page, at most things work fine, but I would like to tell the viewer which of the 2 backends it is that gives the 503, and i can't seem to find the right variable for this. I have tried req.backend which gives (null) and some others, but no luck.

req.backend should be ok. I'm using
<li>URL: http://"} +
req.http.host + req.url + {"</li>
<li>Referer: "} +
req.http.referer + {"</li>
<li>Request: "} + req.request
+ {"</li>
<li>Time: "} +
obj.http.x-vg-utc + {"</li>
<li>Client: "} + client.ip +
{"</li>
<li>User-Agent: "} +
req.http.user-agent + {"</li>
<li>X-VG-Device: "} +
req.http.X-VG-Device + {"</li>
<li>Cache: "} + server.ip +
{"</li>
<li>Backend: "} + req.backend
+ {"</li>
In my error-page

Varnish defaults backend is the first backend you list in your config.
If you don't set it explict it will use the default and the
req.backend will probably be "null" so my first backend is

backend unassigned {
# Wildbill
.host = "10.84.200.5";
.port = "80";
}

And set it all backends expliclty in the vcl_recv.

--
Audun Ytterdal
http://audun.ytterdal.net

_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Varnish misc RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.