Is WSGIErrorOverride supported?
The release notes for 3.0 have this blurb
- Implement WSGIErrorOverride directive which when set to On will result in Apache error documents being used rather than those passed back by the WSGI application. This allows error documents to match any web site that the WSGI application may be integrated as a part of. This feature is akin to the ProxyErrorOverride directive of Apache but for mod_wsgi only. Do note though that this feature has only been implemented for mod_wsgi daemon mode. See:
http://code.google.com/p/modwsgi/issues/detail?id=57
But the configuration page does not list this directive as an option.
- Is it supported?
- Does it work outside of daemon mode? If not, is there a github issue akin to that defunct google code link?
Thank you.
Oh, seems nothing was ever added to docs for it.
It does not work outside of daemon mode as there is no easy way with Apache internal request handling to really replace wholesale the existing response when in embedded mode.
The feature was intended to originally work like:
- https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyerroroverride
but only for daemon mode.
Note though that although ProxyErrorOverride in Apache 2.4 allows you to specify specific error codes to be replaced, in mod_wsgi it doesn't since when originally added Apache did not support doing it for specific error codes so never considered it. Am not sure how hard would be to allow specific errors to be listed.
Anyway, whether the directive still works am not sure since have probably never tried it since was added. Are you having a specific issue with it?
Working link for that old Google Code site issue is:
- https://code.google.com/archive/p/modwsgi/issues/57
Thank you for the detailed response!
Anyway, whether the directive still works am not sure since have probably never tried it since was added. Are you having a specific issue with it?
It appears to be working as intended in daemon mode.
Note though that although ProxyErrorOverride in Apache 2.4 allows you to specify specific error codes to be replaced, in mod_wsgi it doesn't since when originally added Apache did not support doing it for specific error codes so never considered it. Am not sure how hard would be to allow specific errors to be listed.
Turns out that I could really use this feature, so if you are still interested in considering it :)
As far as I know it isn't possible to implement it for embedded mode.
Why are you using embedded mode anyway? You should always use daemon mode unless you have quite specific requirements that need it and your application works well enough that it can survive without all the benefits you get from daemon mode around auto recovery of stuck processes, request timeouts etc.
Why are you using embedded mode anyway?
Sorry if I was confusing, but I am using daemon mode.
If you are using daemon mode, then I am confused why you would want that feature implemented for embedded mode.
If you are using daemon mode, then I am confused why you would want that feature implemented for embedded mode.
Sorry to continue to confuse you, I am asking for ProxyErrorOverride to allow specifying which error codes to override.