Setting cache headers for CQSE 404 page
Hi,
Need help with figuring out a solution for an issue in our CQ environment. The scenario:
- Publish restarts in a not controlled way (maybe due to an OOM)
- Instance is still reachable via the Net.
- During startup a default 404 page is delivered from CQSE(?). This is before the "500 starting up"-phase.
- A visitor accesses the site during this short startup phase
- Startup 404 page is forwarded through dispatcher (where the default cache timeout is set to 1hr)
- 404 page is cached in CDN until purged
In normal circumstances 404s are forwarded to a non-existing page to trigger Sling error handling (so that the no-cache headers are set, which is done in the overlayed Sling error handler).
We do not want the 404's to be cached in our CDN.
One thought has been to modify the response headers in the dispatcher httpd.conf. Found a solution for Apache 2.4 (which unfortunately is not supported for our windows platform). I have not been able to find a similar solution for Apache 2.2.
What I am looking for is suggestions on how to catch this "startup" 404 page in the best possible way and modify it with no-cache response headers.
I know that it is kind of a corner case. In normal circumstances access to a server in startup mode has been disabled by removing access to the environment in our loadbalancer.
But unfortunately we have had problems with unexpected shutdowns lately (an area we also are focusing on).
Our setup: author (5.6.1) - publish (5.6.1) - dispatcher (Apache 2.2) - load balancer - cdn (Akamai) on a windows platform.