Exclude 404 from apache service

My apache is configured as a reverse proxy for liferay tomcat, 5 virtual hosts are configured on liferay tomcat, the configuration below is used to service 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 

The problem is that apache due to ProxyErrorOverride is serviced by 404 hits, is there any way to get around 404 so that it is serviced from the server server?

Thus, I can have separate 404 pages for different virtual hosts. Since virtual hosts are not configured on apache, I cannot tell apache to display different error pages for different sites.

I want to continue serving 403 and 500 from apache, so ProxyErrorOverride cannot be disabled.

+6
source share
1 answer

You can have multiple virtual hosts on Apache. Just point them all to the same application server and make sure you save the host.

Then you can configure for each virtual host on the application server.

+1
source

All Articles