# 使用 Let's Encrypt 设置多个域名 / 重定向

**URL:** https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685
**Category:** Sysadmins
**Tags:** how-to, letsencrypt
**Created:** [2017年二月1日 02:21 UTC](https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685 "2017-02-01T02:21:03Z")
**Posts on this page:** 1
**Showing post:** 174

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2025年八月20日 12:55 UTC](https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685/174 "2025-08-20T12:55:36Z")

</div>

> [@Paul\_King](#):
>
> 原谅我的无知，但这是可以通过网站设置进行编辑的吗？还是需要在 app.yml 中进行编辑？

它放在 `app.yml` 中。它不由 Discourse 处理，而是由容器中的 NGINX 处理，并且无法访问 Discourse 数据库。

> [@Paul\_King](#):
>
> 如果是前者，我在更新到最新版本后没有找到它，如果是后者，app.yml 中具体应该调整什么？

它放在 ENV 部分

```plaintext
env:
   DISCOURSE_HOSTNAME_ALIASES: domain.com,other.domain.com

```

您只需包含您希望用户能够链接到并重定向到您网站实际主机名的其他域。

---

_[View the full topic](https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685)._
