我有一个 apache 服务器充当 web 服务的反向代理,其配置如下:
<VirtualHost *:18010>
SSLEngine on
ProxyRequests off
SSLProxyEngine on
ProxyPass / https://backend.url:4445/
ProxyPassReverse / https://backend.url:4445/
SSLVerifyClient require
SSLVerifyDepth 10
SSLCACertificateFile ssl/cacerts.pem
</VirtualHost>
运行良好。但是,当“客户端”针对 URL 后面运行的 WebService 运行查询时,如果后端响应错误,则代理仅显示存在错误 500,例如:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator at
dl-fr-mco-unix@ubs.com to inform them of the time this error occurred,
and the actions you performed just before this error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>
而当“直接”(不通过代理)查询WebService时,我们可以看到服务器返回的“真实”错误,例如:
Error 500: javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "test" (Class iseries.wsbeans.avews10.PrecheckInput), not marked
at [Source: com.ibm.ws.webcontainer.srt.SRTInputStream@6bd1f156; line: 1, column: 11] (through reference chain: iseries.wsbeans.avews10.PrecheckPaymentInput["test"])
所以我的问题是:是否有一个选项可以添加 apache 配置,以便它返回后端返回的完整错误,而不仅仅是错误 500?
再次感谢问候,