# 为 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:** 83

<div class="post-metadata">

**Author:** ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)\
**Post date:** [2019年六月27日 22:19 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/83 "2019-06-27T22:19:44Z")

</div>

你好，

## 简介

感谢你的解决方案，@fefrei！我们已在 [https://community.hiveeyes.org/](https://community.hiveeyes.org/) 上实施了该方案，效果非常好。

## 进一步思考

不过，我们希望在此引用 @mlinksva 在 [Site maintenance mode during rebuilds?](https://meta.discourse.org/t/site-maintenance-mode-during-rebuilds/29697) 中提出的相关问题，因为该问题也令我们感同身受，且目前尚未通过 `/errorpages` 方案解决。这涉及改进通用提示文本“_抱歉，我们无法加载该主题，可能是由于连接问题。_”。我们将尝试更详细地阐述这一点。

### 提供 `discourse_offline.html`

当新用户首次访问网站时，这非常完美。

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/b/7b41c02b6f19e1a4b6ae9dff5250abc37eaf0457.png)

### 提供不同的“抱歉”提示文本

然而，在 Discourse 内部导航时，系统会像这样向你报错：

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/b/cb0de4238e3041190c4cd1208fca3fc7cc6633b9.png)

却未揭示任何原因。

既然我们已与您相熟，想必应该有一个自定义功能可以修改该文本，对吧？我们可能只是错过了它。我们尚未调查功能 _管理 » 备份 » 启用只读模式_ 是否如 [Maintenance Mode?](https://meta.discourse.org/t/maintenance-mode/91300) 所述已经解决了该问题。

尽管如此，我们认为在此再次提出该话题是有意义的，希望您不会介意这是否显得多此一举。

此致，  
Andreas.

* * *

附言：[@staff](https://meta.discourse.org/groups/staff)：鉴于此讨论在适当的 Nginx 或 Web 服务器配置细节方面有些失控，我建议进行彻底的重组，将这些帖子拆分到一个名称恰当的主题中，例如“配置 Web 服务器以显示离线页面”。我相信您会找到一个合适的标题。如果您觉得该建议值得采纳，提前表示感谢。

---

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