Tomcat的重定向到维护页面时下降 [英] Redirect tomcat to maintenance page when down

查看:764
本文介绍了Tomcat的重定向到维护页面时下降的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的tomcat6与ubuntu9.10 mod_jk的设置(在80端口都在运行)和8.10服务器。我部署在/ usr /共享/ tomcat的/ webapps中的战争文件。在部署期间,我重新启动Tomcat,我会当tomcat的应用程序在浏览器访问进入以下页面:

I'm using tomcat6 with mod_jk setup(both running at port 80) on ubuntu9.10 and 8.10 servers. I deploy war files under /usr/share/tomcat/webapps. During deployment, as I restart the tomcat, I will get the following page when the tomcat application is accessed on the browser:

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Apache/2.2.11 (Ubuntu) mod_jk/1.2.15 Server at 192.168.2.54 Port 80

怎么可能这个网页重定向到其他一些自创建维护页面,而Tomcat服务器宕机?

How could I redirect this page to some other self created maintenance page while the tomcat server is down?.

推荐答案

您可以在Apache的设置自定义错误页的错误code 503

You can setup custom error page in Apache for error code 503.

<一个href=\"http://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

ErrorDocument 503 /maintance.html

这篇关于Tomcat的重定向到维护页面时下降的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆