The usage of the ProxyErrorOverride directive is not without causing us any headeache.
- When the ProxyErrorOverride directive is set to off, the default error handler is not involved when trying to access an inexistent PHP script. instead, we get a blank page.
- When the ProxyErrorOverride directive is set to on, the default error handler get involved even when that is not expected. That is really bad for PHP applications that provide their own handler for error pages, or even worse when an API send a regular HTTP code such as 404, 403, 503 ...
I searched a bit for a viable alternative and I ended with something like this:
So here, the fix is quick simple, we set the handler for PHP only when the file exists. This seem to solve all issues. This should not prevent any application to catch any URL to /index.php. I'll test a bit further and if ok, I'll add that fix in version 1.3.9. Of course, with that fix, the ProxyErrorOverride directive must be set to off.