Dashboard > Community Wiki > ... > Deployment > How to show a maintenance page when tomcat is down
How to show a maintenance page when tomcat is down Log In View a printable version of the current page.

Added by Boris Kraft , last edited by Boris Kraft on Jun 23, 2008
Labels: 

Problem

When your application server is down, you'd like to show a nice maintenance page instead of a "server not reachable" error message.

Solution

Configure Tomcat (or whatever else you use) to only listen on internal port 8080 and use a packet filter like pf or ipfw to redirect public port 80 to internal port 8080.
Use e.g. lighttpd listening on a different internal port (e.g. 80) for serving
a maintenance page. Create a second ruleset for maintenance mode redirecting
from public port 80 to lighttpd's port. Switch pf rules when doing maintenance.

As an added bonus, add the rule switch to the tomcat startup/shutdown scripts and your maintenance page will show up automatically whenever you shutdown your application server.

(This idea is from Oliver Lietz)

Powered by a free Atlassian Confluence Open Source Project License granted to Magnolia International. Evaluate Confluence today.
Powered by Atlassian Confluence 2.7, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators