# 如何配置外部 nginx 与 Discourse

**URL:** <https://meta.discourse.org/t/how-can-i-configure-external-nginx-with-discourse/154201>\
**Category:** Self-hosting\
**Created:** [2020年六月8日 15:39 UTC](https://meta.discourse.org/t/how-can-i-configure-external-nginx-with-discourse/154201 "2020-06-08T15:39:44Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [2020年六月8日 16:07 UTC](https://meta.discourse.org/t/how-can-i-configure-external-nginx-with-discourse/154201/4 "2020-06-08T16:07:14Z")

</div>

您也可以在 Docker 中运行 Discourse 来实现这一功能。例如，请查看此主题：

> [@Add an offline page to display when Discourse is rebuilding or starting up](https://meta.discourse.org/t/adding-an-offline-page-when-rebuilding/45238?u=itsbhanusharma):
>
> warning This guide is intended for advanced users, who are already using nginx outside the docker container. By following this guide you make your setup more complicated and will lose some speed benefits like HTTP2 if you’re not running Ubuntu 16.04 or later. Proceed with caution! When Discourse is rebuilding or starting up, your users will usually either see an error message from their browser… …or a not-so-nice 502 error message from Nginx: If you’re a perfectionist …

---

_[View the full topic](https://meta.discourse.org/t/how-can-i-configure-external-nginx-with-discourse/154201)._
