Sending custom error pagesIf you are unfortunate enough to suffer a total failure of all of your webservers, all is not lost. Zeus Traffic Manager can host custom error pages for you, and this article shows you how! If all of the servers in a pool have failed, you have several options:
However, you may reach the point where you've got nowhere to send your users. All your servers are down, so failure pools are not an option, and you can't redirect a visitor to a different site for the same reason. In this case, you can use a third option:
Use the 'error file' setting in the Virtual Server configuration (prior to 6.0 this setting was per Pool) to achieve this. The error file should be placed in your
This HTML error page will now be returned whenever an HTTP request is received, and all of your servers are down. Embedding images and other resourcesNote that the HTML page has embedded images and stylesheets. Where are these files hosted? With the current configuration, the error page will be returned for every request. You can use a little TrafficScript to detect requests for files referenced by the error page, and serve content directly from the conf/extra/ directory. First, we'll modify the error page slightly to may it easier to recognize requests for files used by the error page:
and
Then, upload the Finally, the following TrafficScript request rule can detect requests for those files and will make the traffic manager serve the response directly:
Copy and paste this TrafficScript into the Rules Catalog, and assign it as a request rule to the virtual server. Images (and css or js files) that are then copied into the $ZEUSHOME/zxtm/conf/extra can be refered to using /.extra/imagename.png. You will also be able to test your error page by browsing to /.extra/errorpage.html (assuming the file is called errorpage.html in the extra directory). Comments:This public messageboard is not a forum for technical support. To report technical support problems, please contact our dedicated Support team using the instructions at the bottom of this page.
Comment from:
test [Visitor]
Under IE explore,there is 500 error when use this.
Comment from:
Crispin Flowerday [Zeus Dev Team]
Internet Explorer has a feature called 'friendly error pages'. It uses these when the error page it was provided is under 512 bytes.
You can disable these error pages from the Advanced tab of the 'Internet Options' dialogue. Although for a complete solution (that will work for your customers), ensure that your error page is greater than 512 bytes long.
Comment from:
Alexey [Visitor]
I wasn't able to find the option to set the HTTP redirect on failure, as suggested here:
"You may configure ZXTM to send an HTTP Redirect message, directing your visitors to an alternate website." We use ZXTM-LB. Please advise on how this can be configured!
Comment from:
Owen Garrett [Zeus Dev Team]
If you were using ZXTM, you could use the following TrafficScript rule to send the redirect:
if( pool.activeNodes() == 0 ) http.redirect( "http://knowledgehub.zeus.com" ); Of course, in ZXTM LB, you don't get TrafficScript, and the ZXTM RuleBuilder can't be used to implement this logic. Instead, use the 'error_file' setting in the 'Connection Management' part of the Pool configuration. First, create a file called 'redirect-to-knowledgehub' (for example) in your conf/extra directory. It should contain the following HTTP header data: Location: http://knowledgehub.zeus.com/ Then edit your Pool configuration, go to the 'Connection Management' part, and configure 'error_file' to the name of the file you created. You can easily test the configuration by setting all of the nodes in your pool to drain.
Comment from:
Owen Garrett [Zeus Dev Team]
From Twitter:
kevinfoote: ok. got my poor man's maintenance page setup done. using RuleBuilder and a maintenance pool http://www.tinyurl.com/ydkj7nn maybe some interest.. Thanks Kevin! |
Recently...
Other Resources
|





