我尝试了所有我在apache文档和stackoverflow和博客上发现的其他sugestions.当我将folloowing行添加到任何配置文件,如/etc/apache2/apache2.conf或/etc/apache2/conf.d/localized-error-pages或/etc/apache2/httpd.conf或/etc/apache2/sites-enabled/000-default:
ErrorDocument 503 "This is an error msg"甚至是HTML消息
ErrorDocument 503 "<h1> This is an error message </h1>
或外部URL重定向ErrorDocument 503 http://www.google.com它的工作原理.
但是,当我尝试内部重定向时,ErrorDocument 503 /ERROR_503.html
或者ErrorDocument 503 /error/ERROR_503.html我得到最后一行的默认消息:
此外,尝试使用ErrorDocument处理请求时遇到503 Service Temporarily Unavailable错误.
我试图把html错误页面放在DocumentRoot var/www,at var/www/error.尝试取消注释所有/etc/apache2/conf.d/localized-error-pages将所有错误设置为具有国际化的自定义页面的文件/usr/share/apache2/error.并且由于此文件中的消息与默认值相同,因此该行
此外,尝试使用ErrorDocument处理请求时遇到503 Service Temporarily Unavailable错误.不再显示了.但是,如果我改变线
`ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var`
Run Code Online (Sandbox Code Playgroud)
在本地化错误页面文件中放置到同一页面的新html,错误返回并且页面未显示.如果我编辑文件HTTP_SERVICE_UNAVAILABLE.html.var,浏览器消息也没有任何变化.
更多信息:我正在使用apache2将端口80上的所有请求通过工作端口重定向到端口8089的tomcat.我的配置文件是https://dl.dropboxusercontent.com/u/1105054/apache.zip