# Apache 웹사이트와 함께 Discourse 설치하기

**URL:** https://meta.discourse.org/t/install-discourse-together-with-apache-websites/173907
**Category:** Self-hosting
**Created:** [12월 21, 2020, 10:22오전 UTC](https://meta.discourse.org/t/install-discourse-together-with-apache-websites/173907 "2020-12-21T10:22:53Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![blades](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@blades](https://meta.discourse.org/u/blades)
#### Post date: [12월 21, 2020, 10:22오전 UTC](https://meta.discourse.org/t/install-discourse-together-with-apache-websites/173907/1 "2020-12-21T10:22:53Z")

</div>

여러분 안녕하세요,

이전에는 서버에서 완전히 정상적으로 작동하는 discourse 설치 환경을 가지고 있었습니다.  
이제 제 discourse 백업을 apache 웹 서버에 복원하기로 결정했지만, 불가능한 것 같습니다.  
meta에서 많은 해결책을 읽고 시도해 보았지만 아무것도 작동하지 않았습니다.  
도움을 주실 분이 계신가요? 미리 감사드립니다.

현재 제 상황은 https가 활성화된 상태로 복원된 discourse 설치 환경이지만, vhost 설정 파일이나 apache 설정 파일이 올바르게 설정되어 있지 않아 오류가 발생하고 있으며, 당연히 discourse가 표시되지 않습니다. (설치가 완료될 때까지 apache2 서비스를 비활성화한 채로 discourse를 설치했습니다.)

\*apache가 비활성화된 상태에서는 설치가 정상적으로 작동합니다

---

<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: [12월 21, 2020, 10:47오전 UTC](https://meta.discourse.org/t/install-discourse-together-with-apache-websites/173907/2 "2020-12-21T10:47:46Z")

</div>

> [@blades](#):
>
> 이제 저는 Apache 웹 서버에서 discourse 백업을 복원하기로 결정했지만, 불가능한 것 같습니다.

물론 가능합니다 🙂

Discourse 앞에 Apache2를 리버스 프록시로 설정하는 것은 간단하며, 메타 사이트에는 이를 지원하는 수많은 튜토리얼이 있습니다.

여기 한 가지 예시입니다:

> [@Apache 리버스 프록시를 사용하여 설치하고 싶습니다](https://meta.discourse.org/t/i-want-to-install-using-a-reverse-proxy-for-apache/158519):
>
> I wanted to install using Apache’s reverse proxy and tried to install with a custom port, but it didn’t work. Is there any way to do this? Checking your domain name . . . WARNING: Port 443 of computer does not appear to be accessible using hostname: DOMAIN-NAME WARNING: Connection to DOMAIN-NAME (port 80) also fails. This suggests that DOMAIN-NAME resolves to some IP address that does not reach this machine where you are installing discourse. The first thing to do is confirm that DOMAIN-N…

이 사이트에서 검색하면 다른 예시들도 찾을 수 있습니다.

예를 들어:

> [@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…

참고로, 구글 검색을 통해 이 주제에 대한 많은 결과를 찾을 수 있습니다.

---

<div class="post-metadata">

### Author: ![blades](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@blades](https://meta.discourse.org/u/blades)
#### Post date: [12월 21, 2020, 11:39오전 UTC](https://meta.discourse.org/t/install-discourse-together-with-apache-websites/173907/3 "2020-12-21T11:39:34Z")

</div>

이것에 대해 답할 필요는 없었어요. 이미 몇 가지 튜토리얼을 따라 해봤지만 성공하지 못했다고 설명했거든요.

---

<div class="post-metadata">

### Author: ![blades](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@blades](https://meta.discourse.org/u/blades)
#### Post date: [12월 23, 2020, 7:26오전 UTC](https://meta.discourse.org/t/install-discourse-together-with-apache-websites/173907/4 "2020-12-23T07:26:42Z")

</div>

이유는 모르겠지만, apache 서비스가 시작되면 내 discourse 포럼에 접속할 때 [takeiteasy.com](http://takeiteasy.com) 같은 다른 가상 호스트로 리디렉션됩니다. 포럼 도메인은 forum.example.com인데, 두 도메인은 서로 다릅니다.

discourse 도메인의 apache 설정은 다음과 같습니다.

```plaintext
<VirtualHost *:80>
  ServerName forum.example.com
  ServerAlias www.forum.example.com

  <IfModule proxy_module>
    ProxyPreserveHost on
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
  </IfModule>
</VirtualHost>

```

도움 주실 수 있는 분 계신가요?

---

<div class="post-metadata">

### Author: ![blades](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@blades](https://meta.discourse.org/u/blades)
#### Post date: [12월 28, 2020, 6:34오후 UTC](https://meta.discourse.org/t/install-discourse-together-with-apache-websites/173907/5 "2020-12-28T18:34:53Z")

</div>

주제를 닫을 수 있습니다. 문제가 해결되었습니다.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [1월 27, 2021, 6:35오후 UTC](https://meta.discourse.org/t/install-discourse-together-with-apache-websites/173907/6 "2021-01-27T18:35:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
