Reputation: 306
When I make a call using Postman to my API - which is behind a reverse proxy using Apache 2.2 - that returns a 404, I get the standard 404 Not Found html returned instead of the error from the API.
How can I configure Apache to return the error from the API instead of serving it's own HTML?
The route lives inside a <Location>
block:
<Location /service/api>
ProxyPass http://docker1:6001
ProxyPassReverse http://docker1:6001
</Location>
An example 404 call would be http://example.com/service/api/things/1234.
Upvotes: 2
Views: 2992
Reputation: 1225
From my comment earlier:
You might try the ProxyErrorOverride
directive, which should pass through the error as-is when set to off
(the default, in most cases).
Upvotes: 1