• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Site Down Page

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How to show site down page if my app is down for some maintance?
 
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Robert,
There are lots of ways to accomplish this. You could setup another tomcat instance that contains the site-down page, and simply switch the IP on your firewall to point to this new server instead of the maintenance server.


This will work for planned maint.. for unplanned maint or unexpected tomcat crashes/issues a common practice is to use an http server (such as apache) infront of your app server, then use Mod_JK to connect them.

Hope that helps.
Cheers,
Philip
 
Robert Aryan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Philip

1) First I dont't want to go for another tomcat instance.
2) I try something in .htaccess file but nothing is working like this

RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_HOST} !^117\.201\.1\.154
RewriteRule $ /maintenance.html [R=302,L]
 
Philip Thamaravelil
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Robert Aryan wrote:Hi Philip

1) First I dont't want to go for another tomcat instance.
2) I try something in .htaccess file but nothing is working like this

RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_HOST} !^117\.201\.1\.154
RewriteRule $ /maintenance.html [R=302,L]





The apache instance that is integrated with tomcat doesn't have the same feature set as a standard apache install. So, I wouldn't be suprised if rewrites don't work. The rewrite mod doesn't even come with a full Apache install off the shelf. You have to install the rewrite_mod.

Also, I don't believe this will solve your problem. If Tomcat is taken down, so will the apache server that's integrated with it.

Apache/Tomcat/Mod_JK seems the way to go IMO.

Cheers,
Philip
 
reply
    Bookmark Topic Watch Topic
  • New Topic