1

I have an apache server acting as a reverse proxy for a webservice, with a configuration that looks like this one:

<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> 

Which is working nicely. However, when the "clients" run queries against the WebService running behind the URL, if the backend responds an error, the proxy only shows that there was an error 500, such as:

<!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 [email protected] 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> 

While when querying the WebService "directly" (not via the proxy) we can see the "real" error returned by the server, such as:

Error 500: javax.servlet.ServletException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field &quot;test&quot; &#40;Class iseries.wsbeans.avews10.PrecheckInput&#41;, not marked at [Source: com.ibm.ws.webcontainer.srt.SRTInputStream@6bd1f156&#59; line: 1, column: 11] &#40;through reference chain: iseries.wsbeans.avews10.PrecheckPaymentInput[&quot;test&quot;]&#41; 

So my question is : is there an option to add the apache configuration so that it returns the full error returned by the backend, rather than just an error 500 ?

thanks again regards,

1 Answer 1

0

Disable Apache's error page override to allow the actual error to be returned to the client.

<VirtualHost *:18010> ... # Disable Apache's error page override ProxyErrorOverride off </VirtualHost> 

https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyerroroverride

1
  • thank you, I will try the option and mark it as answered if it solves the problem Commented Feb 18 at 11:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.