# Add subdomain exception to nginx to host another site on same host

**URL:** https://meta.discourse.org/t/add-subdomain-exception-to-nginx-to-host-another-site-on-same-host/82357
**Category:** Self-hosting
**Created:** [3월 6, 2018, 9:00오후 UTC](https://meta.discourse.org/t/add-subdomain-exception-to-nginx-to-host-another-site-on-same-host/82357 "2018-03-06T21:00:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![trudat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trudat/32/104354_2.png) [@trudat](https://meta.discourse.org/u/trudat)
#### Post date: [3월 6, 2018, 9:00오후 UTC](https://meta.discourse.org/t/add-subdomain-exception-to-nginx-to-host-another-site-on-same-host/82357/1 "2018-03-06T21:00:09Z")

</div>

I am setting up another web service on the same host as discourse.  
I would like to add an exception to the nginx config so that discourse ignores requests to that subdomain, and the routing can be handled by another process.  
Let’s say I have discourse on `forum.mysite.com` and I’d like to install another service at `xyz.mysite.com`. Is there a **howto** describing how to add an expection?

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [3월 6, 2018, 9:20오후 UTC](https://meta.discourse.org/t/add-subdomain-exception-to-nginx-to-host-another-site-on-same-host/82357/2 "2018-03-06T21:20:37Z")

</div>

Don’t fiddle with the Discourse-internal nginx config like that. It’ll end in tears. Add another nginx as a forward proxy and have _that_ one decide whether to send the request to Discourse or your other service based on the hostname. There’s a howto for that, something about “running other sites on the same machine”.

---

<div class="post-metadata">

### Author: ![trudat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trudat/32/104354_2.png) [@trudat](https://meta.discourse.org/u/trudat)
#### Post date: [3월 6, 2018, 9:42오후 UTC](https://meta.discourse.org/t/add-subdomain-exception-to-nginx-to-host-another-site-on-same-host/82357/3 "2018-03-06T21:42:33Z")

</div>

This one: [Run other websites on the same machine as Discourse](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [6월 8, 2024, 12:37오후 UTC](https://meta.discourse.org/t/add-subdomain-exception-to-nginx-to-host-another-site-on-same-host/82357/4 "2024-06-08T12:37:47Z")

</div>

이 주제는 2285일 후 자동으로 닫혔습니다. 더 이상 답변을 작성할 수 없습니다.
