This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Site Down Page  RSS feed

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
 
Hang a left on main. Then read this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!