When using a reverse proxy, I want to block error messages coming from
the application server by using Apache default error pages.
Basically, I want to mimic the "ProxyErrorOverride On" feature, but for
one particular status code, and for some URL only.
SecRule RESPONSE_STATUS 500 "phase:4,t:none,deny,status:500"
- This works: the back-end server error message is remapped to Apache
- Problem: I receive an extra-message "Additionally, a 500 Internal
Server Error error was encountered while trying to use an ErrorDocument
to handle the request."; this is expected, as it loops (note that no
ErrorDocument is actually defined, but OK ...).
Second try: avoid the loop
SecRule TX:ErrorBlocked "^0$"
SecRule RESPONSE_STATUS 500 "t:none,setvar:TX.ErrorBlocked=1"
- Same result !?!
Does somebody see the problem ?