# \[SOLVED\]Install issues with 2 separate servers

**URL:** <https://meta.discourse.org/t/solved-install-issues-with-2-separate-servers/148015>\
**Category:** Self-hosting\
**Created:** [14 april 2020 om 20:38 UTC](https://meta.discourse.org/t/solved-install-issues-with-2-separate-servers/148015 "2020-04-14T20:38:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [15 april 2020 om 14:04 UTC](https://meta.discourse.org/t/solved-install-issues-with-2-separate-servers/148015/2 "2020-04-15T14:04:44Z")

</div>

FWIW,

For the next step, you might consider changing the proxy to talk to a unix domain socket in the docker container(s).

This setup provides even more flexibility because you can simply do a symbolic link from outside the container to inside and easily switch from one container to another without any downtime and without a need to restart nginx.

For example (on Linux, this will not work on MacOS)

Unix socket might be here (container view), as an example:

```plaintext
/shared/mycool.discourse.sock

```

Outside container:

```plaintext
ln -sf /var/discourse/shared/socket-only/mycool.discourse.sock /tmp/mycool.discourse.sock

```

so your external `nginx` server with reverse proxy to:

```plaintext
/tmp/mycool.discourse.sock

```

Let’s say you are want add some plugins and need to rebuild.

You can rebuild with `/shared/socket-only2` (a simple `yml` change), and to switch to the new container, just:

```plaintext
ln -sf /var/discourse/shared/socket-only2/mycool.discourse.sock /tmp/mycool.discourse.sock

```

(or put it in /var/run or wherever …)

This works very smoothly and you can switch back and forth between containers in a few milliseconds, no `nginx` restart to remap the TCP/IP domain sockets.

I have tested this completely and it works flawlessly and smoothly.

It also works (almost) with Apache2, but in Apache2, you cannot use a symbolic link and must use the full path to the container in the Apache2 site configs, so Apache2 requires a restart to switch, but since you a `nginx` person, this will be easy and smooth outside the container.

---

_[View the full topic](https://meta.discourse.org/t/solved-install-issues-with-2-separate-servers/148015)._
