# 为 Discourse 重建或启动时添加一个离线页面显示

**URL:** <https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238>\
**Category:** Sysadmins\
**Tags:** configuring, how-to, advanced-setup\
**Created:** [2016年六月4日 08:41 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238 "2016-06-04T08:41:48Z")\
**Posts on this page:** 1\
**Showing post:** 156

<div class="post-metadata">

**Author:** ![jericson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jericson/32/116215_2.png) [@jericson](https://meta.discourse.org/u/jericson)\
**Post date:** [2024年一月5日 16:15 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/156 "2024-01-05T16:15:58Z")

</div>

> [@pfaffman](#):
>
> This one has very high reads and I think is one of the least helpfu.

我刚试着用这个指南，但没成功。

我开始用 Nginx 代理来[从单个 Discourse 容器运行两个站点](https://jlericson.com/2024/01/02/multisite_discourse.html)。我只想添加错误页面部分，所以跳过了那些似乎与 [Run other websites on the same machine as Discourse](https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247) 重叠的部分。但我一定漏掉了一个关键步骤。最后，我从[这个 DigitalOcean 教程](https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-to-use-custom-error-pages-on-ubuntu-22-04)中得到了我需要的东西。手动设置并不难，但似乎一定有更好的方法。

> [@pfaffman](#):
>
> Do you think it makes sense to write a replacement that spins up [[HAProxy](https://hub.docker.com/_/haproxy) and [Nginx](https://hub.docker.com/_/nginx)], perhaps with docker compose, . . .

考虑到 Docker 是运行 Discourse 的标准方式，这听起来更好。我猜这会是那种设置好后就可以不用管它的东西。

---

_[View the full topic](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238)._
