# Subfolder with SSL and nginx reverse proxy

**URL:** https://meta.discourse.org/t/subfolder-with-ssl-and-nginx-reverse-proxy/69496
**Category:** Self-hosting
**Created:** [September 6, 2017, 8:04pm UTC](https://meta.discourse.org/t/subfolder-with-ssl-and-nginx-reverse-proxy/69496 "2017-09-06T20:04:40Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [September 6, 2017, 8:42pm UTC](https://meta.discourse.org/t/subfolder-with-ssl-and-nginx-reverse-proxy/69496/2 "2017-09-06T20:42:04Z")

</div>

Here’s what I’d suggest.

Follow this guide to setup subfolder support:

> [@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…

Next, follow this guide to setup the NGINX reverse proxy with Let’s Encrypt SSL support. You can add the offline page, or skip that part of the NGINX config:

> [@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):
>
> 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 …

Note, I’d highly suggest ensuring that your site works completely from `example.com/forum` (the first guide above) before setting up NGINX.

---

_[View the full topic](https://meta.discourse.org/t/subfolder-with-ssl-and-nginx-reverse-proxy/69496)._
