# 멀티 컨테이너, nginx, plesk 관련 도움 요청

**URL:** <https://meta.discourse.org/t/help-with-multi-container-and-nginx-and-plesk/148447>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [4월 18, 2020, 2:00오후 UTC](https://meta.discourse.org/t/help-with-multi-container-and-nginx-and-plesk/148447 "2020-04-18T14:00:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schw\_ede](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schw_ede/32/177423_2.png) [@Schw\_ede](https://meta.discourse.org/u/Schw_ede)\
**Post date:** [4월 18, 2020, 2:00오후 UTC](https://meta.discourse.org/t/help-with-multi-container-and-nginx-and-plesk/148447/1 "2020-04-18T14:00:23Z")

</div>

안녕하세요,

저는 Plesk를 사용하여 서버에 도메인 2개로 Discourse 컨테이너 2개를 설치하는 데 성공했습니다. 두 개 모두 실행 중이지만, 502 오류가 발생하고 있습니다.

오류 로그는 다음과 같습니다:  
` 2020/04/18 13:48:45 [error] 61#61: *125 upstream prematurely closed connection while reading response header from upstream, client: 172.17.0.1, server: _, request: "GET / HTTP/1.0", upstream: "http://127.0.0.1:3000/", host: "my.domain"`

컨테이너를 하나만 실행하면 이 오류가 전혀 나타나지 않습니다. 여러 설정을 시도해 보았지만 문제를 해결하지 못했습니다. 제 이해로는 nginx와 관련이 있으며, 아마도 컨테이너들이 동일한 DOCKER\_HOST\_IP를 사용하고 있기 때문인 것 같습니다. 불행히도 이 값을 변경할 방법을 찾지 못했습니다. Plesk에서 이 값을 편집해도 로그에 변화가 없었습니다. 이 문제에 대해 도움을 주시거나, 제가 무엇을 놓치고 있는지 명확한 조언을 주시면 정말 감사하겠습니다.

그리고 제 영어가 부족해서 죄송합니다. 제 문장이 잘 전달되길 바랍니다.

---

<div class="post-metadata">

**Author:** ![Schw\_ede](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schw_ede/32/177423_2.png) [@Schw\_ede](https://meta.discourse.org/u/Schw_ede)\
**Post date:** [4월 19, 2020, 7:29오후 UTC](https://meta.discourse.org/t/help-with-multi-container-and-nginx-and-plesk/148447/2 "2020-04-19T19:29:53Z")

</div>

좋아요, 제 문제를 해결했습니다. 해결 방법은 다음과 같습니다:

이 오류 메시지에 대한 많은 해결책이 타임아웃 관련이어서, 저도 동일한 수정 방법을 시도해 보았습니다. 하지만 아무런 변화가 없었습니다. 처음에 추가 nginx 지시문을 설정한 방법은 다음과 같습니다:

```
 location / {
	proxy_pass [https://localhost:8500/;](http://)
	proxy_set_header Host $http_host;
	proxy_http_version 1.1;
	proxy_set_header X-Forwarded-Proto $scheme;
	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	proxy_redirect https://localhost:8500/ https://my.domain;
	proxy_read_timeout 300s;
	proxy_connect_timeout 75s;
}

```

그러나 말씀드린 것처럼, 이 방법은 아무런 효과가 없었습니다. 그래서 계속 검색을 이어갔고, 마침내 이 링크를 찾았습니다:  
[https://support.plesk.com/hc/en-us/articles/115004292154-How-to-change-proxy-read-timeout-for-domain-in-Plesk](https://support.plesk.com/hc/en-us/articles/115004292154-How-to-change-proxy-read-timeout-for-domain-in-Plesk)

이 글은 타임아웃 매개변수를 텍스트 필드에만 입력하라고 제안하고 있으므로, 저는 그렇게 했습니다:

 ![Anmerkung 2020-04-19 202605](https://global.discourse-cdn.com/meta/original/3X/3/7/375d875f0d8d54801634e4dffd8d4aa8820e5f86.png)

프록시는 Plesk Docker 플러그인을 통해 처리됩니다.  
이제 모든 것이 완벽하게 작동합니다. 같은 문제로 고생하고 있는 다른 분들께 도움이 되기를 바랍니다.

---

<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:** [5월 19, 2020, 7:29오후 UTC](https://meta.discourse.org/t/help-with-multi-container-and-nginx-and-plesk/148447/3 "2020-05-19T19:29:57Z")

</div>

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