Version 2

     

    Summary

     

    Setting up on-premises installations for maintenance mode is not something Jive Support can do for you, as it is contingent upon your systems and processes and is possibly different for every on-prem customer. However, Jive does have some high level guidances based on our internal setup for Jive-hosted customers that are provided below that can help your team in setting up a maintenance mode feature in your own environment.

     

    Please note, the instructions below are not supported by Jive and are provided as is.

    Set Up

     

    Customize the maintenance page with your messaging

     

    The maintenance page is stored at the following location:

     

    • ~jive/var/www/___sbsstatic___/maintenance.html

     

    To update the maintenance page, just replace maintenance.html with whatever page you want to display during maintenance mode. You'll have to restart Apache for this to take effect. You can then test it by going to <jive URL>/___sbsstatic___/maintenance.html

     

    • jive restart httpd

     

    Setting up Apache Redirect

     

    • The main apache configuration file lives at /etc/jive/httpd/sites/default.conf
    • In order for maintenance mode to work, we need to create a new file: /etc/jive/httpd/sites/proxies/maint.conf with the following contents.
      • Notes:
        • Replace <INSTANCE> with the name of the instance. (YOU DO NOT NEED THE < and > SYMBOLS IN YOUR VALUE) You can use any string you want. This is simply the value of the cookie that we're going to setup for testers/admins to bypass the maintenance page. Example: replace <INSTANCE> with jive_maint_bypass
        • The lines in red are necessary if the LB relies on a keepalive file. You will need to copy the keepalive file (and it's underlying directory structure) from the Tomcat directory into the Apache root to fool the LB into thinking the webapp is still functional. For example, if your keepalive file is in ~jive/applications/sbs/application/keepalive/keepalive.txt, then you will need to copy /keepalive/keepalive.txt into ~jive/var/www and add the lines in red)

     

    RewriteEngine on

    ProxyPass /keepalive/keepalive.txt !

    RewriteCond %{REQUEST_URI} !/keepalive/keepalive.txt

    RewriteCond %{HTTP_COOKIE} !cryptex=<INSTANCE>
    RewriteCond %{REQUEST_URI} !/___sbsstatic___/.*
    RewriteRule ^/(.*)$ /___sbsstatic___/maintenance.html [R]

     

    • Ensure the include for this file exists in /etc/jive/httpd/sites/default.conf

    Include sites/proxies/*.conf

      

     

    • Restart Apache

     

     

    Bypassing the Maintenance page

    To bypass the maintenance page for testing/troubleshooting, you can set a cookie on a user's browser. We recommend you keep the location and name of this "set cookie" page known only to system administrators. Follow the steps below to set it up.

     

     

    Edit the file setcookie.html (attached to this document). It contains the javascript that will create a cookie on the user's machine that allows a browser to bypass the maintenance page. You'll need to edit 2 lines

     

    • The value of document.location is the URL the user will be redirected to after the cookie is set:

    document.location = "YOUR JIVE URL! example: http://acme.hosted.jivesoftware.com"  

      

     

     

    • Change <INSTANCE> to the same exact string that you used in the Apache config in the Set up Apache Redirect step above (YOU DO NOT NEED THE < and > SYMBOLS IN YOUR VALUE).

    <body onload="Set_Cookie('cryptex', '<INSTANCE>', 30, '/'); setTimeout('delayer()', 1000)">

      

     

    Place the file in the following directory

     

    • ~jive/var/www/___sbsstatic___/
    • Navigate to <jive URL>/___sbsstatic___/setcookie.html to test. You should see the following page and be redirected to the URL you set for document.location above.Screen Shot 2014-09-22 at 9.31.59 AM.png