If you run an on-prem AEM, you can put a down.html in your apache doc root and configure dispatcher to point to it. https://www.aemquickstart.in/2017/02/create-maintenance-page-in-apache.html This wont work though for Cloud.
Is there a way to setup a site down page in cloud AEM?
Ideally it would be one we can trigger (turn on/off) manually (e.g. before we do a deploy, or if one of the services our site depends on is down).
Any suggestions?
Views
Replies
Total Likes
Hi @TB3dock
I believe we can create a maintenance page on AEM such as /content/maintenance.html including content and styles and configure the dispatcher to serve the content from the temp path until the actual deployment is done.
Another case can be host a static HTML along with CSS in S3 bucket and use the S3 URL in the dispatcher rewrite to serve the content until the website is up and running.
Using Static HTML hosted within AEM:
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) /content/maintenance.html [PT,L]
Using Static HTML hosted outside of AEM:
RewriteCond %{REQUEST_URI} ^/$
RewriteRule (.*) https://s3.amazonaws.com/bucket/path/maintenance.html [PT,L]
Thanks!
Hi, Its easy to create a dispatcher rule to redirect to a down page, what we need is a way to switch it off and on dynamically.
Hi @TB3dock ,
The best and ideal way to have the custom error handler if you want to have have dynamicity, means which validates if any service is down or during maintenance is through following below documentation
You can make a switch to enable/disable it via a custom page/page property, where business/users can change it and the same property value you can use while writing business logic for error handling use cases.
We are using something like this for 404s, but we need to be able to manually switch the maintenance page on or off, e.g. if one of our sites dependent systems is down, or during an upgrade of one of the systems.
No, in the end we put Azure traffic manager (DNS resolver) in front of AEM and point to a Azure Static web app when we want to do site down. In TM you can switch between different endpoints.
If we did it via AEM, I would use a java servlet filter to do the redirect for html documents based on a setting editable in Author instance. However, this will add a bit of latency to every page, and may or may not affect caching.
Views
Likes
Replies
Views
Likes
Replies