# NGINX proxy for multiple containers?

**URL:** https://meta.discourse.org/t/nginx-proxy-for-multiple-containers/139053
**Category:** Self-hosting
**Created:** [January 18, 2020, 9:25pm UTC](https://meta.discourse.org/t/nginx-proxy-for-multiple-containers/139053 "2020-01-18T21:25:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Steve\_Gaarder](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steve_gaarder/32/137114_2.png) [@Steve\_Gaarder](https://meta.discourse.org/u/Steve_Gaarder)
#### Post date: [January 18, 2020, 9:25pm UTC](https://meta.discourse.org/t/nginx-proxy-for-multiple-containers/139053/1 "2020-01-18T21:25:02Z")

</div>

In this topic:

> [@Multiple Discourses, multiple containers, one server](https://meta.discourse.org/t/multiple-discourses-multiple-containers-one-server/35367):
>
> Despite [at least one reference which purports to describe the process](https://meta.discourse.org/t/multisite-configuration-with-docker/14084) I found it very difficult to work out how to run multiple Discourse instances on the same hosting infrastructure (using an instance of nginx running on the host to proxy the Discourse instances). Apparently there’s a way to run Discourse in a “multisite” mode, with multiple instances from a single code installation, but I have not yet seen a real description of how that works. I’ve gone the route of two independent code inst…

the author discusses using multiple web containers with one data container. They use different ports to direct the traffic to the right container. I am thinking of doing something similar, but using an Nginx proxy to forward traffic based on the request’s hostname. But each web container has its own Nginx proxy in front of rails, and two layers of proxy seems dubious. Would there be issues with having an Nginx installation on the host do the proxying, and talk directly to Rails on each of the web containers, bypassing their own proxies?
