Apache Httpserver 集成Tomcat,在Tomcat未启动时 Error 503错误页的一种配置方式
来源:互联网 发布:mac绘画录制软件 编辑:程序博客网 时间:2024/05/16 17:18
在安装httpserver2.2.x正常使用的基础上:
1、虚拟机配置:
<VirtualHost *:80> ServerAdmin admin@machengshuang.cnServerName www.machengshuang.cnServerAlias www.machengshuang.cn DocumentRoot "D:\Httpserver-2.2.25\htdocs\antma"</VirtualHost>
2、在htdocs\antma 目录下建两个文件 index.html error.html
index.html 如下(引用了jquery):
<!DOCTYPE html><head><title>加载中...</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script src="jquery-1.10.2.js"></script> <script type="text/javascript"> $(document).ready(function(){$.ajax({type : "get",url : "http://localhost:8080/project/", //Tomcat项目地址data : null,cache : false,beforeSend : function(){},success : function(resp) {window.location.href = 'http://localhost:8080/project'; //Tomcat项目地址},error : function() {window.location.href = './error.html';},complete : function(){}});}); </script></head><body></body></html>
error.html 如下:
<!doctype html><html><head><meta charset="UTF-8"><title>系统正在维护</title><style>* {margin:0;padding:0;}body {background:url(images/bg.png) no-repeat;background-position:top center;width:100%;height:100%;position:relative;}.time {font-size:30px;color:#000000;position:fixed;left:50%;margin-left:-160px;margin-top:380px;}</style> <script src="jquery-1.10.2.js"></script> <script type="text/javascript">function getIndex(){$.ajax({type : "get",url : "http://localhost:8080/project/", //Tomcat项目地址
data : null,cache : false,beforeSend : function(){},success : function(resp) {clearInterval(timer);window.location.href = 'http://localhost:8080/project'; //Tomcat项目地址},error : function() {},complete : function(){}});}var timer=setInterval(getIndex,60000); </script></head><body> <span class="time"> 预计恢复时间:20:30 </span></body></html>进入error.html 后,会定时访问Tomcat 项目地址可用性,一旦可用,自动跳转到项目页面
阅读全文
0 0
- Apache Httpserver 集成Tomcat,在Tomcat未启动时 Error 503错误页的一种配置方式
- 启动Apache Tomcat报各种Error错误的解决方式
- 绿色版 Apache HttpServer 和绿色版 Tomcat 的启动
- Windows 下 Apache HttpServer + Tomcat 的整合
- 在FREEBSD配置apache和tomcat的启动
- Apache-httpserver + Tomcat负载均衡
- apache与tomcat集成方式
- 将tomcat与apache集成并配置集群方式
- Apache Server + Tomcat 集成配置
- Apache Server + Tomcat 集成配置
- Apache Server + Tomcat 集成配置
- TomCat启动时错误 Error filterStart
- tomcat启动时 Error starting static Resources 错误的解决
- Tomcat启动时出现的Error filterStart错误
- 纠正tomcat 的错误启动方式
- Apache Tomcat的安装配置方式
- Apache HttpServer的安装并与Tomcat整合Linux 版
- Tomcat项目发布的三种方式;一种:直接将项目(文件)直接复制到tomcat/webapps下二种:在tomcat/conf/server.xml配置tomcat的虚拟路径;
- 源码到可执行文件过程
- maven打包
- e820/efi 内存表
- mysql 为某个字段的值加前缀、去掉前缀
- SSL2694 2017年8月15日提高组T1 字符串(math,组合数取模)
- Apache Httpserver 集成Tomcat,在Tomcat未启动时 Error 503错误页的一种配置方式
- caffe源码解读之Blob
- 1050: 阶乘的累加和
- 工作与生活真的可以平衡吗
- 浅谈大型分布式系统Redis内存数据库实践
- HDU 6130 Kolakoski
- 极值问题-(斐波那契数列)
- 2017-8-15
- ZOJ 3432 Find the Lost Sock(模拟)