Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

How to setup a site down (maintenance page) for cloud AEM?

TB3dock
Level 7
Level 7

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?

4 Replies
asutosh_jena
Community Advisor
Community Advisor

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! 

TB3dock
Level 7
Level 7

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.

Ritesh_M
Community Advisor
Community Advisor

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

 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/ful...

 

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.

TB3dock
Level 7
Level 7

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.