我正在尝试设置自定义错误页面(反向代理是 apache)
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
**Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.**
但是,例如,如果我停止我的 tomcat 服务器,则不会加载错误页面(503 错误)
我收到上面的消息不是我的 .HTML 消息
我的配置如下所示:
<VirtualHost *:443>
ServerAdmin XXX
ServerName XXX
# Possible values: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
ErrorLog XXX
CustomLog XXX
DocumentRoot /var/www/html/
ErrorDocument 503 /503.html
<Directory />
AllowOverride None
Require all granted
</Directory>
ProxyPreserveHost On
<Location />
AddDefaultCharset Off
Require all granted
ProxyPass ajp://XXX:XXX/ disablereuse=on
</Location>
如果我将 ErrorDocument 行更改为 foo 而不是 /503.html 我会看到 foo 所以看起来 .HTML 不是由配置加载的?有人可以帮助我吗?