# Ghost 与 Discourse 的 SSO 实现

**URL:** https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934
**Category:** SSO
**Created:** [2022年八月23日 00:24 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934 "2022-08-23T00:24:00Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [2022年八月23日 00:24 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/1 "2022-08-23T00:24:00Z")

</div>

它不应该在 Cloudflare 基础套餐上运行吗？

可以从 Nginx 实现吗？我们正计划 [将 SSO 与 Ghost 结合使用](https://github.vikaspotluri.me/discourse-on-ghost/#getting-started)，我看到使用同一域会更简单且更可持续。

---

<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: [2022年八月23日 00:52 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/2 "2022-08-23T00:52:18Z")

</div>

> [@satonotdead](#):
>
> 这不应该在 Cloudflare 基础套餐上运行吗？

我不这么认为。

> [@satonotdead](#):
>
> 我看到同一个域名更容易且更可持续。

使用子文件夹要困难得多，而且没有任何好处。我曾经使用子文件夹的客户都已迁移到子域名。

说明描述了如何在同一台机器上运行它们。

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [2022年八月23日 01:44 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/3 "2022-08-23T01:44:22Z")

</div>

> [@pfaffman](#):
>
> 并且没有任何好处。

在我们的案例中，SSO 可以更安全，所以对我们来说是某种强制性的。

它会非常糟糕还是只需要大量配置？

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2022年八月23日 04:21 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/4 "2022-08-23T04:21:34Z")

</div>

SSO 与子文件夹无关。即使 Discourse 在完全不同的域上，SSO 也应该可以正常工作。

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [2022年八月23日 05:49 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/5 "2022-08-23T05:49:31Z")

</div>

[也许你没有检查我之前发布的链接](https://github.vikaspotluri.me/discourse-on-ghost/#getting-started)。

是的，这与 SSO 有很大关系，因为 SSL 证书和许多我不会为了避免配置反向代理而妥协的事情。

**我指的是 Ghost 和 Discourse 单点登录的实现。**

_抱歉，我没明白你的意思。你没有提供任何保证，所以你的评论完全没有用。没有数据，没有链接，只是在重复一些完全不相关的东西。_

---

<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: [2022年八月23日 05:56 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/6 "2022-08-23T05:56:26Z")

</div>

您可以配置 sso 而不使用子文件夹。使用子域会更简单。我查看了链接，没有发现任何表明情况并非如此的迹象。

您可以同时配置两个子域上的 ssl。这比使用子文件夹所需的反向代理要容易。

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [2022年八月23日 05:58 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/7 "2022-08-23T05:58:04Z")

</div>

那是假的吗？

> 安全（推荐）：镜像 Ghost 用于验证成员的身份验证。
> 
> **要求 DoG 与您的 Ghost 网站位于同一域（而不是子域）**

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [2022年八月23日 06:01 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/8 "2022-08-23T06:01:24Z")

</div>

这是他们将 Bridge（关于 ghost 的讨论）安装在与您的 ghost 网站相同域上的要求。这并不意味着 Discourse 需要安装在子目录中。希望这能让事情变得清楚。

---

<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: [2022年八月23日 06:09 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/9 "2022-08-23T06:09:03Z")

</div>

好的。如果您确实想使用这种安装方法，而不是此处描述的方法，那么您可以这样做。您可以从他们那里获得支持，而不是从这里获得支持，因为这是一种非标准安装。

在单独的子域上使用 [Discourse Connect](https://meta.discourse.org/t/13045?silent=true) 将更易于安装和维护。

---

<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: [2022年八月23日 07:11 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/10 "2022-08-23T07:11:55Z")

</div>

您好 @satonotdead 🙂

我已经将您的帖子分到了一个专门的主题下，所以您可能需要为现在的 OP 添加更多细节。 👍

（恐怕我对这方面了解不多，所以可能需要一个更好的标题和标签等 🙂）

一般来说，子文件夹安装比标准的子域名设置在技术上更难维护。如果您在社区支持中找不到想要的答案，可以尝试在 #Marketplace 分类下寻求专业帮助。 👍

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [2022年八月23日 15:02 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/11 "2022-08-23T15:02:37Z")

</div>

> [@JammyDodger](#):
>
> 一般来说，子文件夹安装比标准的子域设置在技术上更难维护

我唯一提出的问题（至今仍未得到答复）是 **为什么** 以及这样做有什么问题？

感谢您为论坛所做的审核工作。但我担心，即使您进行分割、添加更多标签、更多描述，问题仍然是同一个。

您真的认为 #Marketplace 是问这个问题的地方吗？

_我以为 Meta 是一个讨论的地方，也许我错了。_

---

<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: [2022年八月23日 15:31 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/12 "2022-08-23T15:31:55Z")

</div>

哦，非常抱歉。我以为您在为将 Ghost 安装在 Discourse 子文件夹设置中寻求支持。

那么您只是想知道为什么子文件夹设置比标准安装更具技术性吗？

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [2022年八月23日 15:34 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/13 "2022-08-23T15:34:33Z")

</div>

> [@satonotdead](#):
>
> 为什么

> [@Serve Discourse from a subfolder (path prefix) instead of a subdomain](https://meta.discourse.org/t/subfolder-support-with-docker/30507):
>
> warning Discourse Official Statement about Subfolder setup We support subfolder setups for our hosted customers at the enterprise level and up. Due to heavy technical setup complexity we strongly recommend you do not use this setup unless you are very experienced in custom subfolder setups. It is critical you have a deep understanding of NGINX setup in the Discourse Docker container Secure original IP forwarding using custom headers in the proxy chain Rate limiting in front proxy server I…

---

<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: [2022年八月23日 15:58 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/14 "2022-08-23T15:58:23Z")

</div>

> [@satonotdead](#):
>
> 我提出的唯一问题（至今仍未得到答复）是 **为什么** 以及那有什么问题？

您提出的安装 Discourse 的方式是这里没有人熟悉的方式。如果出现问题，您将无法在此获得帮助。它可能运行得很好，永远如此，但到目前为止，这里似乎没有人听说过它。

如果您来这里是为了获得建议，并且问题是“如何安装 Discourse 并让 Ghost 成为我社区的 [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) (SSO) 服务器”，那么答案是在与 Ghost 分开的服务器上的子域上执行标准安装。还有一些关于在单台服务器上运行多个站点的主题。

使用子文件夹比将站点保留在其自己的子域上要复杂得多，因此除非您有非常充分的理由（并且不再认为改进的 SSO 是一个好理由），并且还具备设置 Discourse 的专业知识，否则不建议这样做。使用子文件夹的站点少得多，因此许多东西，特别是某些主题组件，在这种配置下未经充分测试，因此它们也可能以与使用子域时不同的方式损坏。

---

<div class="post-metadata">

### Author: ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)
#### Post date: [2022年八月24日 00:15 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/15 "2022-08-24T00:15:50Z")

</div>

这不是原因。你没有说明技术设置的复杂性。

---

<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: [2022年八月24日 00:34 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/16 "2022-08-24T00:34:08Z")

</div>

那里比标准安装有更多的步骤。因此，它更复杂。

亲自试试就知道。那才是你真正了解的唯一方式。

---

<div class="post-metadata">

### Author: ![HAWK](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hawk/32/86627_2.png) [@HAWK](https://meta.discourse.org/u/HAWK)
#### Post date: [2026年九月10日 23:34 UTC](https://meta.discourse.org/t/ghost-discourse-sso-implementation/236934/17 "2026-09-10T23:34:34Z")

</div>


