Tomcat stack, customize page 503 when tomcat is stopped

Hi, I have installed the bitnami tomcat stack 8.0.42-0 on ubuntu 14.04.3 in my AWS EC2 instance.

I want to configure a custom 503 page when I stop the tomcat, like a maintainence message.

I tried to edit /opt/bitnami/apache2/htdocs/503.html but this isn’t the page showed when the tomcat isn’t responding via AJP due to be stopped.

How can I solve this?


Changed from:

<LocationMatch "^/(?!((server-status|phpmyadmin)([^a-zA-Z0-9]|$))).$
  ProxyPass ajp://localhost:8009

To (added |[0-9]+.html after phpmyadmin)

<LocationMatch "^/(?!((server-status|phpmyadmin|[0-9]+.html)([^a-zA-Z0-9]|$))).$
  ProxyPass ajp://localhost:8009

This filters apache2 server to not proxy to tomcat any url with “[numbers in name].html”.


We are glad that you were able to fix the issue. If you have any other questions, please do not hesitate to let us know.

Best regards,
Carlos R. Hernández