# Setting up Discourse on a machine with existing Nginx

**URL:** https://meta.discourse.org/t/setting-up-discourse-on-a-machine-with-existing-nginx/121869
**Category:** Self-hosting
**Created:** [2 juli 2019 om 08:57 UTC](https://meta.discourse.org/t/setting-up-discourse-on-a-machine-with-existing-nginx/121869 "2019-07-02T08:57:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![thsnyzkn](https://avatars.discourse-cdn.com/v4/letter/t/0ea827/32.png) [@thsnyzkn](https://meta.discourse.org/u/thsnyzkn)
#### Post date: [2 juli 2019 om 08:57 UTC](https://meta.discourse.org/t/setting-up-discourse-on-a-machine-with-existing-nginx/121869/1 "2019-07-02T08:57:46Z")

</div>

I have a dedicated server that runs my website using Nginx. I am trying to follow the linked guide([discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)), but once I run ./discourse-setup command, it stopped and displayed a message that guides me to a link([Run other websites on the same machine as Discourse](https://meta.discourse.org/t/17247)), but in this link, it is stated that I need to edit my app.yml file, but it is not exist, because setup command failed to start.  
[discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2 juli 2019 om 11:57 UTC](https://meta.discourse.org/t/setting-up-discourse-on-a-machine-with-existing-nginx/121869/2 "2019-07-02T11:57:17Z")

</div>

You can copy samples/standalone.yml.

You can edit discourse-setup to skip the test.

You can disable your web server long enough to run discourse-setup.

Getting discourse working is the easiest part of the advanced configuration that you are attempting.

Have a look at [Run other websites on the same machine as Discourse](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247). I believe there is another nginx specific topic.

---

<div class="post-metadata">

### Author: ![thsnyzkn](https://avatars.discourse-cdn.com/v4/letter/t/0ea827/32.png) [@thsnyzkn](https://meta.discourse.org/u/thsnyzkn)
#### Post date: [2 juli 2019 om 12:11 UTC](https://meta.discourse.org/t/setting-up-discourse-on-a-machine-with-existing-nginx/121869/3 "2019-07-02T12:11:14Z")

</div>

Thanks for the reply.

> [@pfaffman](#):
>
> You can disable your web server long enough to run discourse-setup.

What you mean for this sentence. I actually followed the steps you have mentioned, but right now, If I type ./launcher rebuild app, after a while I am getting another error saying that " [2019-07-02T11:51:07.931930 #16] INFO – : \> cd /var/www/discourse && gem update bundler  
ERROR: While executing gem … (Gem::RemoteFetcher::UnknownHostError)  
timed out ([https://rubygems.org/specs.4.8.gz](https://rubygems.org/specs.4.8.gz))"

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2 juli 2019 om 12:15 UTC](https://meta.discourse.org/t/setting-up-discourse-on-a-machine-with-existing-nginx/121869/4 "2019-07-02T12:15:52Z")

</div>

That’s a different problem.

It likely means that your server has a networking or dns issue.

---

<div class="post-metadata">

### Author: ![thsnyzkn](https://avatars.discourse-cdn.com/v4/letter/t/0ea827/32.png) [@thsnyzkn](https://meta.discourse.org/u/thsnyzkn)
#### Post date: [3 juli 2019 om 06:39 UTC](https://meta.discourse.org/t/setting-up-discourse-on-a-machine-with-existing-nginx/121869/5 "2019-07-03T06:39:18Z")

</div>

But, I have another web application on this server runs already. I am not even able to execute the command “./launcher enter app”, because I don’t have the container that is up and running for me.

Edit: I think my problem is that creating an nginx configuration on my host for my container doesn’t take affect, I can’t make reverse proxy.
