CA Single Sign-On Tech Tip by Sau Lai Wong, Principal Support Engineer for 5th September 2016
Introduction:
With Secure Proxy Server, when Tomcat is shutdown/ not contactable, HTTP server error 503 is returned to end user as Apache failed to forward requests to Tomcat.
OOTB error:
======================================================
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
=======================================================
Question:
How to customize the error, indicative of Tomcat is not available?
Environment:
All SPS releases.
Answer:
To customize the error, update the ErrorDocument
directive in <SPS>\httpd\conf\httpd.conf file.
The syntax of the ErrorDocument
directive is:
ErrorDocument <3-digit-code> <action>
where the action will be treated as:
- A local URL to redirect to (if the action begins with a "/").
- An external URL to redirect to (if the action is a valid URL).
- Text to be displayed (if none of the above). The text must be wrapped in quotes (") if it consists of more than one word.
Additional Information:
https://httpd.apache.org/docs/2.4/custom-error.html
https://httpd.apache.org/docs/2.4/mod/core.html#errordocument