How to configure custom error page in Apache httpd with mod-jk?
Issue
- How to configure
mod_jk
to send Apache httpd error pages instead of the backend application server - How to show Apache httpd error page instead of the backend application server in
mod_jk
- I would like to show Apache httpd error page when Tomcat returns HTTP status code 5xx response
- Hide backend JBoss server default error page and show Apache httpd error page instead
- I have the
ErrorDocument
directive defined for 404, 500, 403, etc errors in Apache but the JBoss error page still displays when my application responds with error status (404, 500, 403, etc). ProxyErrorOverride On
does not work if used withmod_proxy_ajp
module in Apache httpd in JBoss EWS 1.0.x and 2.0.x.- When I access a 404 URL in the /app context, which is proxied with AJP, I get a 404 page from backend servers (Tomcat, JBoss EAP, and so on). Accessing 404 URLs via non-proxied content works as intended, as defined in
"ErrorDocument"
. It works inmod_proxy_http
(i.e. changing protocol toajp
tohttp
).
Environment
- Red Hat Enterprise Web Server (EWS)
- Red Hat JBoss Web Server (JWS)
- Red Hat JBoss Core Services (JBCS)
- Apache HTTPD
- mod_jk
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.