A sorry page served from the F5 is usually best
- a self-contained HTML with embedded images/js OR
- can have resources served from a domain other than the domain for which you are displaying the sorry page OR
- can be a 302 redirect to a sorry page on another domain
If you wanted to serve a sorry page and someone else produces it for you and puts it on a webserver for you, you can scoop it up like this and store it as an ifile ;
curl -H "Accept-Encoding:gzip" http://10.9.8.7/sorry.html > /var/class/sorry_html
tmsh create sys file ifile "sorry_html" source-path file:/var/class/sorry_html
tmsh create ltm ifile "sorry_html" file-name "sorry_html"
I tend to use LB_FAILED to serve a page myself as it covers all failure modes, not just when all pool members down;-
when LB_FAILED {
HTTP::respond 503 -version 1.1 content [ifile get "sorry_html"] noserver Accept-Encoding "gzip" Content-Type "text/html;charset=utf-8" Retry-After "300" noserver
}
If you wanted to serve an image scoop it up from server like this;
tmsh create sys file ifile "myimage_png" source-path http://10.9.8.7/myimage.png
tmsh create ltm ifile "myimage_png" file-name "myimage_png"
then in the iRule to display the image;-
HTTP::respond 200 -version 1.1 content [ifile get "myimage_png"] noserver Content-Type "image/png" noserver