# 메인 사이트 domain.com에 discourse.domain.com 설정하기

**URL:** https://meta.discourse.org/t/setup-discourse-domain-com-with-main-site-at-domain-com/174271
**Category:** Self-hosting
**Created:** [12월 25, 2020, 6:45오후 UTC](https://meta.discourse.org/t/setup-discourse-domain-com-with-main-site-at-domain-com/174271 "2020-12-25T18:45:49Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![epsteindidnt](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@epsteindidnt](https://meta.discourse.org/u/epsteindidnt)
#### Post date: [12월 25, 2020, 6:45오후 UTC](https://meta.discourse.org/t/setup-discourse-domain-com-with-main-site-at-domain-com/174271/1 "2020-12-25T18:45:49Z")

</div>

매우 기본적인 질문인 것 같아 죄송합니다. 제가 하려는 일은 많은 분들이 원하실 것 같은데, 구글/검색을 해봐도 관련 정보를 찾지 못했습니다.

domain.com에 사이트를 운영 중이며(아파치 사용), 해당 사이트의 포럼으로 forum.domain.com에 디스커스(Discourse) 포럼을 설치하려고 합니다. 루트 도메인과 포럼 도메인이 각각 독립적으로 해결(resolve)되기를 원합니다.

DNS 설정은 모두 올바르게 완료한 것으로 생각하며, 루트 도메인과 포럼 서브도메인 모두 동일한 IP로 포인터/해결되도록 설정되어 있습니다.

디스커스를 먼저 설치하면 루트 도메인이 항상 디스커스 포럼 서브도메인으로 리다이렉트됩니다. 따라서 사용자는 루트 도메인에 접근할 수 없습니다.

반대로 아파치를 먼저 루트 도메인으로 설정하고 포럼 서브도메인에 디스커스를 설치하려고 하면, 디스커스 설치에 실패하며 포럼 서브도메인을 해결할 수 없다고 표시됩니다(루트 도메인에 아파치를 미리 설정하지 않은 상태에서는 이 문제가 발생하지 않습니다).

즉, 제가 무엇을 잘못하고 있으며, 제가 달성하려는 설정을 올바르게 만드는 방법은 무엇인가요?

---

<div class="post-metadata">

### Author: ![geoff777](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/geoff777/32/202388_2.png) [@geoff777](https://meta.discourse.org/u/geoff777)
#### Post date: [12월 25, 2020, 7:48오후 UTC](https://meta.discourse.org/t/setup-discourse-domain-com-with-main-site-at-domain-com/174271/2 "2020-12-25T19:48:20Z")

</div>

> [@epsteindidnt](#):
>
> DNS 설정이 모두 올바르게 되어 있다고 생각하는데, 루트 도메인과 포럼 서브도메인 모두 동일한 IP를 가리키거나 해석되도록 설정되어 있습니다.

두 개의 서로 다른 IP로 해석되어야 합니다.

루트 도메인은 Apache 서버의 IP로,  
forum. 서브도메인은 Discourse 서버의 IP로 설정하세요.

---

<div class="post-metadata">

### Author: ![epsteindidnt](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@epsteindidnt](https://meta.discourse.org/u/epsteindidnt)
#### Post date: [12월 25, 2020, 8:07오후 UTC](https://meta.discourse.org/t/setup-discourse-domain-com-with-main-site-at-domain-com/174271/3 "2020-12-25T20:07:46Z")

</div>

저는 두 가지를 동일한 서버, 즉 동일한 IP에 함께 사용하고 있습니다. 이것이 문제인가요? 이 तरह의 구성을 위해 서버 두 대가 필요한가요? 문서에는 forum.domain.com이 domain.com과 동일한 IP를 가져야 한다고 되어 있었습니다.

서버 두 대를 사용하지 않고 이 구성을 할 수 있는 방법이 있을까요? 제 클라이언트는 하나의 웹사이트라고 생각하는 것을 위해 두 번째 서버를 실행하는 비용을 지불하고 싶어 하지 않을 것입니다.

---

<div class="post-metadata">

### Author: ![geoff777](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/geoff777/32/202388_2.png) [@geoff777](https://meta.discourse.org/u/geoff777)
#### Post date: [12월 25, 2020, 8:37오후 UTC](https://meta.discourse.org/t/setup-discourse-domain-com-with-main-site-at-domain-com/174271/4 "2020-12-25T20:37:30Z")

</div>

원하시는 목표를 달성하기 위한 표준 설정은 서버 2대입니다.

같은 서버에서도 가능할 것 같습니다 .. 저는 직접 시도해 본 적이 없습니다. 행운을 빕니다.

> [@Set up Discourse on a server with existing Apache sites](https://meta.discourse.org/t/how-to-set-up-discourse-on-a-server-with-existing-apache-sites/30013):
>
> It’s not as daunting as it sounds! While this may sound a bit intimidating at first, it’s really not all that bad. You basically need to do two things: Install HAProxy (or an alternative) which will take over port 80 and then divert your Discourse traffic to your docker container, and all your other sites to your usual Apache set-up. Let Apache know which port to listen for. While this is only a rough guide, it should do a good job of pointing you in the right direction. Let’s get star…

> [@epsteindidnt](#):
>
> 제 클라이언트는 하나의 웹사이트라고 생각하는 것에 대해 2번째 서버를 실행하기 위해 비용을 지불하고 싶어 하지 않을 것입니다.

클라이언트에게 루트 도메인과 서브도메인은 서로 다른 웹사이트임을 교육해야 합니다.  
특히 방문자 수가 증가할 것으로 기대하는 경우라면 더욱 그렇습니다.

---

<div class="post-metadata">

### Author: ![epsteindidnt](https://avatars.discourse-cdn.com/v4/letter/e/c6cbf5/32.png) [@epsteindidnt](https://meta.discourse.org/u/epsteindidnt)
#### Post date: [12월 26, 2020, 12:17오전 UTC](https://meta.discourse.org/t/setup-discourse-domain-com-with-main-site-at-domain-com/174271/6 "2020-12-26T00:17:26Z")

</div>

> 클라이언트에게 루트 도메인과 서브도메인은 서로 다른 웹사이트임을 교육시켜야 합니다.  
> 특히 방문자 수가 증가할 것으로 예상되는 경우 더욱 그렇습니다.

그렇긴 하지만, 같은 서버에서 여러 다른 웹사이트를 실행할 수 있는 거 아닌가요?

---

<div class="post-metadata">

### Author: ![geoff777](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/geoff777/32/202388_2.png) [@geoff777](https://meta.discourse.org/u/geoff777)
#### Post date: [12월 26, 2020, 7:51오전 UTC](https://meta.discourse.org/t/setup-discourse-domain-com-with-main-site-at-domain-com/174271/7 "2020-12-26T07:51:08Z")

</div>

네, 가능합니다. 잘 작동하기를 바랍니다.
