# 设置 Discourse

**URL:** https://meta.discourse.org/t/setting-up-discourse/203873
**Category:** Self-hosting
**Created:** [2021年九月18日 04:48 UTC](https://meta.discourse.org/t/setting-up-discourse/203873 "2021-09-18T04:48:19Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2021年九月18日 10:00 UTC](https://meta.discourse.org/t/setting-up-discourse/203873/13 "2021-09-18T10:00:29Z")

</div>

这可能是 Let’s Encrypt 的问题。我发现这条提示对于同时为 www 和非 www 域名颁发证书非常有用：

> [@Set up Let’s Encrypt with multiple domains / redirects](https://meta.discourse.org/t/setting-up-let-s-encrypt-with-multiple-domains/56685):
>
> NOTE: @pfaffman says: This page needs to be cleaned up. There is now a new ENV setting that will let you add more hostnames. In your app.yml under your DISCOURSE\_HOSTNAME line (it can go many places but that one makes sense), add DISCOURSE\_HOSTNAME\_ALIASES: domain.com,other.domain.com and early reports suggest that you’ll get valid certs for those domains and that accessing https://domain.com will properly redirect you to your DISCOURSE\_HOSTNAME without a certificate error. If you do that an…

---

_[View the full topic](https://meta.discourse.org/t/setting-up-discourse/203873)._
