# Installing Discourse Under Nginx

**URL:** https://meta.discourse.org/t/installing-discourse-under-nginx/45381
**Category:** Self-hosting
**Created:** [June 7, 2016, 4:07pm UTC](https://meta.discourse.org/t/installing-discourse-under-nginx/45381 "2016-06-07T16:07:19Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JupiterFlux](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@JupiterFlux](https://meta.discourse.org/u/JupiterFlux)
#### Post date: [June 7, 2016, 4:07pm UTC](https://meta.discourse.org/t/installing-discourse-under-nginx/45381/1 "2016-06-07T16:07:20Z")

</div>

From what I’ve read Discourse is meant to be installed using a Docker Image, which (from what I’ve read) means it will basically be the entire contents of the VM that it runs on, which… well, is less than ideal for me. Basically, I have a server running Nginx and hosting multiple sites, simply put… Can I add Discourse as another site in any way, or MUST it be installed using the Docker image and be the only thing on the server?

PS Prior to reading about Docker today, I didn’t know what it was, so pardon me if I’m misunderstanding something.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [June 7, 2016, 4:13pm UTC](https://meta.discourse.org/t/installing-discourse-under-nginx/45381/2 "2016-06-07T16:13:27Z")

</div>

Yes, you can, just follow this after installing via Docker

> [@Run other websites on the same machine as Discourse](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247):
>
> @pfaffman edited this heavily 2022.02.24. Blame me if it’s broken. If you want to run other websites on the same machine as Discourse, you need to set up an extra NGINX or HAProxy proxy in front of the Docker container. NOTE: This is for advanced admins This guide assumes you already have Discourse working - if you don’t, it may be hard to tell whether or not the configuration is working. You cannot use ./discourse-setup to set up Discourse if another server is using port 80 or 443. You will…

---

<div class="post-metadata">

### Author: ![JupiterFlux](https://avatars.discourse-cdn.com/v4/letter/j/d2c977/32.png) [@JupiterFlux](https://meta.discourse.org/u/JupiterFlux)
#### Post date: [June 7, 2016, 8:38pm UTC](https://meta.discourse.org/t/installing-discourse-under-nginx/45381/3 "2016-06-07T20:38:00Z")

</div>

Looks great, thanks! I am already somewhat familiar with everything involved in a multi-site setup on Nginx, it appears as though what I’m doing is basically redirecting traffic that comes in to the host’s Nginx to the Discourse Docker setup.

Thanks for the help!
