Add maintenance page in Confluence
Asked by Svante Gustafsson Bj?rkegren:

Hi,

I have added a maintenance page in JIRA to show users when we do not allow them to access the application. This page is located in \<JIRA-INST\>/atlassian-jira (next to the 404 page etc) and we control this with the apache in front of JIRA. Works like a charm!

But, when I try to dp exactly the same in my Confluence instance I get a weird effect. The maintenance page (pure html) is located in \<CONF-INST\>/confluence (next to the 404.vm etc) and when I access this page it shows alright but I also see my Confluence menubar (?!) on the top which makes it possible for user to open e.g. the Dashboard.

Does anyone have some ideas why this is the case? Even though I pinpoint my maintenance-page like this: <https://my-server/maintenace.html> (as I said it works in JIRA like: [https://my-jira-server/jira/maintenance.html](https://my-jira-server/jira/maintenance.html,), yes I have a context path in my JIRA installation but not in Confluence)

Thanks in advance!

// Svante


Answers:
author: Matthew J. Horn
body: If I understand this correctly, you could disable decorators on a pattern that matches the maintenance page. For example, let's say your page is called "maint.html".

You could edit the decorators.xml file and add a new entry within the \<decorator name="none"\> block:

\<url-pattern\>/maint.html\</url-pattern\>

comments: author: Svante Gustafsson Bj?rkegren
body: Hi Matthew,

Thanks for this brilliant tip!

It worked like a charm! I put the maintenece-page in the confluence/confluence folder and updated the decorators.xml file with the absolute path to this page!

Now the Maintenance-page is shown without the Confluence-bar!

Super!

Thanks again!

// Svante


author: Matthew J. Horn
body: BTW, you can achieve similar behavior by appending ?decorator=none to the URL. Fun tip for testing. :)


author: PeterKoczan
body: Yes, this is the case, I have just tested it on the very latest EAP version of Confluence 5.2, even there it will act like this. You can try and playing around with CSS to hide the unwanted elements based on the tutorial here: \[<https://confluence.atlassian.com/display/CONFKB/How+to+Hide+Elements+in+Confluence+Using+CSS+or+JavaScript>\]

However, for this you'll need to apply the css from within the custom html page you put in the root of Confluence.

Kind regards,

Peter


author: PeterKoczan
body: Hi Svante,

The recommended way of having a maintenance page is described here: <https://confluence.atlassian.com/display/CONFKB/How+To+Create+a+Maintenance+Splash+Page>

Also, we have a feature request to provide this function natively in Confluence: <https://jira.atlassian.com/browse/CONF-1029>

I hope you find the above helpful to get this working for Confluence. As of the specific problem, Confluence headers will be added for all pages served for Confluence, can you let me know the version you are using? Maybe that's the catch here.

Kind regards,

Peter

comments: author: Svante Gustafsson Bj?rkegren
body: Hi Peter, thanks for your really quick answer!

I have looked at the link you provided and I rather want to manage this with my reversed proxy to avoid having to shutdown Confluence as well as update the server.xml file.

We are currently running Confluence 4.3.7

Do you mean that all pages shown from the confluence instance automatically gets the main menu bar added? (with the Dashboard-link, search box etc)

Rgrds,

// Svante


Tags: confluence-administration

maintenance