use*_*465 5 tomcat apache2 http-status-code-503
我使用mod_jk设置在端口80上运行apache2和tomcat6(未从apt存储库安装,手动下载和安装).访问jsp servlet页面,将浏览器指向http://myapp.mydomain.com/(虚拟主机在tomcat(server.xml)和apache中完成).在部署期间,当tomcat关闭(pkill -9 java或/etc/init.d/tomcat stop)时,我正在尝试将tomcat的错误页面503重定向到自定义错误页面.
我的apache的Document Root是/ var/www/so我把它放在apache2.conf文件的下面
ErrorDocument 503 maintenance.html并在/ var/www下创建了一个文件maintenance.html.当我测试停止tomcat并且我将页面重定向到maintenance.html而没有更改url但是没有显示实际页面,而是maintenance.html在浏览器上显示文件名.任何人都可以帮我正确配置当tomcat关闭时重定向到正确的maintenance.html页面的apache吗?
从阿帕奇文档中,
URLs can begin with a slash (/) for local web-paths (relative to the
DocumentRoot), or be a full URL which the client can resolve.
Run Code Online (Sandbox Code Playgroud)
我想ErrorDocument 503 /maintenance.html 应该可以。
| 归档时间: |
|
| 查看次数: |
13818 次 |
| 最近记录: |