# 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:** [2015 年5 月 21 日 23: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:** 9

<div class="post-metadata">

作者： ![stroupaloop](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stroupaloop/32/43099_2.png) [@stroupaloop](https://meta.discourse.org/u/stroupaloop)\
发布日期： [2015 年5 月 23 日 17:45 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/9 "2015-05-23T17:45:01Z")

</div>

So I ended up just ditching the ELB as there’s other questions about how to setup duplicate EC2 instances to actually use load balancing and manage asset paths and updates appropriately. I was able to setup HTTPS within Discourse/docker and used an elastic IP.

> [@riking](#):
>
> Make the directory. Although, actually, as of today, that directory will be made for you now.
> 
> Also, I believe that various research indicated that spying is being done on unencrypted backend connections. You should have SSL all the way through, even if on self-signed certs as long as the cert sha-2 fingerprint is verified.

So I was able to get this setup, BUT I used

```
/var/discourse/shared/web-only/ssl/

```

INSTEAD of

```
/var/discourse/shared/standalone/ssl/ as I wasn't sure standalone would work.

```

Thanks for the clarification!

> [@hughevans](#):
>
> I like to have the whole domain fronted by a CDN such a CloudFront or CloudFlare and then you can use that to redirect HTTP \> HTTPS.

Fair enough, I had some difficulty setting this up and ended up ditching ELB (see above) and just used CloudFront as an asset CDN on a different domain. Basically, I thought I had it setup correctly, but when I’d ping the correct URL which was pointed to an A record ALIAS of the CloudFront, it’d redirect to the ELB URL.

> [@DeanMarkTaylor](#):
>
> There is actually a /srv/status end point which should return a simple 200 “ok” response.

Thanks! I’ll give this a try instead of the TCP:80/ health check.

---

_[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)._
