# 重建后自托管实例上拒绝连接

**URL:** <https://meta.discourse.org/t/connection-refused-on-self-hosted-instance-after-rebuild/376224>\
**Category:** Bug\
**Created:** [2025年七月28日 17:28 UTC](https://meta.discourse.org/t/connection-refused-on-self-hosted-instance-after-rebuild/376224 "2025-07-28T17:28:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanya\_byrne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tanya_byrne/32/444826_2.png) [@tanya\_byrne](https://meta.discourse.org/u/tanya_byrne)\
**Post date:** [2025年七月28日 17:28 UTC](https://meta.discourse.org/t/connection-refused-on-self-hosted-instance-after-rebuild/376224/1 "2025-07-28T17:28:49Z")

</div>

如本帖所述，[自上次更新后无法安全连接到自托管的 Discourse - 支持 - Discourse Meta](https://meta.discourse.org/t/no-secure-connection-to-self-hosted-discourse-after-latest-update/376163/5) 似乎存在一个重建问题，导致 `CONNECTION REFUSED` 问题。

此实例的配置或 SSL 证书均未发生更改，并且在最近的重建之前证书一直正常工作。

我在日志中找到的信息在此处：[No secure Connection to self-hosted Discourse after latest update - #5 by tanya\_byrne](https://meta.discourse.org/t/no-secure-connection-to-self-hosted-discourse-after-latest-update/376163/5?u=tanya_byrne)

---

<div class="post-metadata">

**Author:** ![tanya\_byrne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tanya_byrne/32/444826_2.png) [@tanya\_byrne](https://meta.discourse.org/u/tanya_byrne)\
**Post date:** [2025年七月28日 18:05 UTC](https://meta.discourse.org/t/connection-refused-on-self-hosted-instance-after-rebuild/376224/2 "2025-07-28T18:05:29Z")

</div>

我认为这个 PR 引入了这个问题 [FEATURE: Move letsencrypt scripts to work on boot by featheredtoast · Pull Request #977 · discourse/discourse\_docker · GitHub](https://github.com/discourse/discourse_docker/pull/977)，特别是对 `[templates/web.ssl.template.yml](https://github.com/discourse/discourse_docker/pull/977/files#diff-b8c95dfe3760424eecc60d21538dbd785f096d46ef95764c60f4b608f40dd536 "templates/web.ssl.template.yml")` 的更改。我将此文件恢复到更改之前的状态，现在我的论坛可以正常加载了。

---

<div class="post-metadata">

**Author:** ![tanya\_byrne](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tanya_byrne/32/444826_2.png) [@tanya\_byrne](https://meta.discourse.org/u/tanya_byrne)\
**Post date:** [2025年七月28日 18:24 UTC](https://meta.discourse.org/t/connection-refused-on-self-hosted-instance-after-rebuild/376224/3 "2025-07-28T18:24:55Z")

</div>

看起来 `ENABLE_SSL` 已被选中，但现在应该在 `app.yml` 文件中设置吗？这可以解释为什么它会失败……

---

<div class="post-metadata">

**Author:** ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)\
**Post date:** [2025年七月28日 23:47 UTC](https://meta.discourse.org/t/connection-refused-on-self-hosted-instance-after-rebuild/376224/4 "2025-07-28T23:47:07Z")

</div>

抱歉，这里还在施工中——正如另一个主题中所提到的，修复程序即将到来：

> <https://github.com/discourse/discourse_docker/pull/985>
>
> Default ENABLE\_SSL to 1 when template is included.

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2025年七月29日 22:00 UTC](https://meta.discourse.org/t/connection-refused-on-self-hosted-instance-after-rebuild/376224/5 "2025-07-29T22:00:46Z")

</div>

此主题已在 19 小时后自动关闭。不再允许回复。
