# Setting up Discourse with SSL on Docker with AWS ELB breaks and returns 503 Service Unavailable (Back-end server is at capacity)

**URL:** <https://meta.discourse.org/t/setting-up-discourse-with-ssl-on-docker-with-aws-elb-breaks-and-returns-503-service-unavailable-back-end-server-is-at-capacity/29098>\
**Category:** Self-hosting\
**Tags:** docker\
**Created:** [5월 21, 2015, 11:52오후 UTC](https://meta.discourse.org/t/setting-up-discourse-with-ssl-on-docker-with-aws-elb-breaks-and-returns-503-service-unavailable-back-end-server-is-at-capacity/29098 "2015-05-21T23:52:05Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![mahcr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mahcr/32/206943_2.png) [@mahcr](https://meta.discourse.org/u/mahcr)\
**Post date:** [2월 25, 2021, 4:53오후 UTC](https://meta.discourse.org/t/setting-up-discourse-with-ssl-on-docker-with-aws-elb-breaks-and-returns-503-service-unavailable-back-end-server-is-at-capacity/29098/14 "2021-02-25T16:53:08Z")

</div>

AWS는 초보이지만, 해결책을 찾는 분들을 위해 제가 성공적으로 적용한 방법을 공유합니다:

1. `app.yml` 파일을 편집하고 let’s encrypt 템플릿 주석을 처리합니다.

```plaintext
## Let's encrypt is not needed, the load balancer issues the certificate
## - "templates/web.ssl.template.yml"
## - "templates/web.letsencrypt.ssl.template.yml"

```

1. 인스턴스에 SSH로 접속하여 다음을 실행합니다:

- `cd /var/discourse/`
- `./launcher rebuild app`

1. ALB에서 80 포트의 리스너 규칙을 생성하여 443으로 리다이렉트합니다.
2. 443 리스너에서 인스턴스로 리다이렉트하는 규칙을 생성합니다.

---

_[View the full topic](https://meta.discourse.org/t/setting-up-discourse-with-ssl-on-docker-with-aws-elb-breaks-and-returns-503-service-unavailable-back-end-server-is-at-capacity/29098)._
