# 为 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:** 3\
**Page:** 8

<div class="post-metadata">

**Author:** ![lilydjwg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilydjwg/32/515838_2.png) [@lilydjwg](https://meta.discourse.org/u/lilydjwg)\
**Post date:** [2025年八月2日 23:28 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/161 "2025-08-02T23:28:56Z")

</div>

> [@fefrei](#):
>
> `proxy_set_header Host $http_host;`

您好，当使用 HTTP/3 时，这会导致 400 错误。为什么不使用 `$host`？

---

<div class="post-metadata">

**Author:** ![singi2016cn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/singi2016cn/32/532755_2.png) [@singi2016cn](https://meta.discourse.org/u/singi2016cn)\
**Post date:** [2026年二月3日 06:31 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/162 "2026-02-03T06:31:14Z")

</div>

是否有更容易的实现方式？例如把这些逻辑整合到一个插件。或者采用另外更容易的方式实现。

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2026年二月3日 11:01 UTC](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238/163 "2026-02-03T11:01:35Z")

</div>

> [@Move from standalone container to separate web and data containers](https://meta.discourse.org/t/move-from-standalone-container-to-separate-web-and-data-containers/29413):
>
> warning This is an advanced setup. Don’t follow this unless you are experienced with Linux server administration and Docker. 2 Container Setup for a New Site Added by @pfaffman 2019-12-11. NOTE: If you want to create a 2 container site you can do this: ./discourse-setup --two-container It works just like normal except it’ll create separate data and web\_only containers and generate a random password for the database. If you already have an app.yml you’ll need to rename it, or discourse-…

这可以规避这个问题——它允许你在保持在线的同时进行引导，然后切换容器，从而只有几秒钟的停机时间，而不是几分钟。然后，可以说就没有必要设置离线页面了。

另一个好处是，你可以通过引导来确认构建的成功 👍，从而可能为你节省数小时的停机时间。

[上一頁](https://meta.discourse.org/t/add-an-offline-page-to-display-when-discourse-is-rebuilding-or-starting-up/45238.md?page=7)
