title: How to solve add a custom error 503 page html on ubuntu apache2 using it with mod_jk and virtual host redirecting to tomcat
body: <p>I tried all I found at apache documentation and other sugestions found at stackoverflow and blogs.
  When I add the folloowing line to any configuration file like <code>/etc/apache2/apache2.conf</code> or <code>/etc/apache2/conf.d/localized-error-pages</code> or <code>/etc/apache2/httpd.conf</code> or <code>/etc/apache2/sites-enabled/000-default</code>:</p>
  
  <p><code>ErrorDocument 503 "This is an error msg"</code> or even an html message 
  <code>ErrorDocument 503 "&lt;h1&gt; This is an error message &lt;/h1&gt;</code>
  or an external url redirect <code>ErrorDocument 503 http://www.google.com</code> it works.</p>
  
  <p>But when I try an internal redirect like <code>ErrorDocument 503 /ERROR_503.html</code>
  or <code>ErrorDocument 503 /error/ERROR_503.html</code> I get the default message with last line:</p>
  
  <p>Additionally, a 503 Service Temporarily Unavailable
  error was encountered while trying to use an ErrorDocument to handle the request.</p>
  
  <p>I tried to put the html error page at the DocumentRoot <code>var/www</code>, at <code>var/www/error</code>.
  Try to uncomment all the file <code>/etc/apache2/conf.d/localized-error-pages</code> that sets all errors to custom pages with internationalization that are at <code>/usr/share/apache2/error</code>. 
  And as the messages inside this files are the same as the default, the line</p>
  
  <p>Additionally, a 503 Service Temporarily Unavailable
  error was encountered while trying to use an ErrorDocument to handle the request.
  is not shown anymore. But if I change the line </p>
  
  <pre><code>`ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var`
  </code></pre>
  
  <p>at the localized-error-pages file to a new html placed at the same page, the error is back
  and the page is not shown. If I edit the file <code>HTTP_SERVICE_UNAVAILABLE.html.var</code> nothing change at the browser message too.</p>
  
  <p>Some more information: I'm using apache2 just to redirect all request on port 80 to tomcat at port 8089 via an worker. My configuration files are <a href="https://dl.dropboxusercontent.com/u/1105054/apache.zip" rel="nofollow">https://dl.dropboxusercontent.com/u/1105054/apache.zip</a></p>