How to configure custom error page in Apache httpd with mod-jk?

Solution Verified - Updated -

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 with mod_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 in mod_proxy_http (i.e. changing protocol to ajp to http).

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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In