I have apache configured as reverse proxy to liferay tomcat, 5 virtual hosts are configured on liferay tomcat, below configuration is used to serve error pages from apache.
Alias /error/ "/usr/share/apache2/error/"
Options -Indexes
ProxyPassMatch /error/(403|5xx) !
ProxyErrorOverride On
ErrorDocument 500 /error/5xx/500.html
ErrorDocument 403 /error/403/403.html
Problem is 404 hits are also being served by apache because of ProxyErrorOverride, is there a way I can bypass 404 so that will be served from backend server ?
This way I can have separate 404 pages for different virtual hosts. Since virtual hosts are not configured on apache, I cant tell apache to serve different error pages for different site.
I want to keep serving 403 and 500 from apache so ProxyErrorOverride cant be Off.