Forum Moderators: phranque

Message Too Old, No Replies

Display a custom error html page for 503 error

         

learntoconfigure

1:31 pm on Nov 11, 2010 (gmt 0)

10+ Year Member



Hi,

I need to displaya custom error page for 503 errors.

I created a simple html page named 503.html and updated the httpd.conf file by adding
ErrorDocument 503 /503.html
The DocumentRoot is already set till 'htdocs'
Also to add, this is the location where we have placed other html pages related to our site.

However, the page does not render and I get an error saying :

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Temporarily Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

Please advise asap.

Thanks in advance

sublime1

1:36 am on Nov 13, 2010 (gmt 0)

10+ Year Member



It should work (assuming the file in htdocs/503.html is readable by the web server, and of course: you restarted the server?), suggesting that maybe you're not actually getting a 503 error?

Simulate the condition and ensure your server is returning a 503 status by looking at the access logs, error logs, or using a tool like Firefox Live HTTP Headers (or curl, or wget). Keep in mind that some browsers decide they are better at explaining the problem than you, so it may be that your server did return the response but the browser ignored it.

Another thing to try: specify a message right in the ErrorDocument line and see if that displays.

Tom

jdMorgan

1:30 am on Nov 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The problem may hinge on *exactly how* you are invoking this 503 condition.

The 503 condition must not be re-invoked if the object being requested is the custom 503 error page itself; Otherwise, you will get the recursion reported in the server's error message that you posted.

Jim