Add an offline page to display when Discourse is rebuilding or starting up

Hi there,

Introduction

Thanks for that solution, @fefrei! We’ve implemented this on https://community.hiveeyes.org/ and it works like a charm.

Further thoughts

However, we would like to reference the related question by @mlinksva at Site maintenance mode during rebuilds? here, as this also resonates with us and does not get solved by the /errorpages solution yet. This is about improving the generic text “Sorry, we couldn’t load that topic, possibly due to a connection problem.”. We will try to outline this in more detail.

Serving discourse_offline.html

This is perfect when users come along fresh to the site.

Serving a different “Sorry for that” text

However, when navigating within Discourse, it will yell at you like

image

without reveilling anything about the reason.

As we know you already, there will probably be a customization feature for being able to change that text, right? We might just have missed that. We’ve also not investigated whether the Feature Admin » Backup » Enable read-only would solve that already as outlined in Maintenance Mode?.

Nevertheless, it made sense to us to bring up this topic here again and hope you don’t mind if that would have been silly.

With kind regards,
Andreas.


P.S.: @staff: As this discussion somehow spiraled out of control regarding appropriate Nginx or Web server configuration details, I would like to suggest a thorough refactoring by splitting these posts into an appropriately named topic like “Configuring web server for offline page”. I’m sure you will find a good title. Thanks already if you like that suggestion and find it worth to follow.