# Unable To Connect/Connection Refused due to https certificates

**URL:** https://meta.discourse.org/t/unable-to-connect-connection-refused-due-to-https-certificates/51276
**Category:** Self-hosting
**Created:** [October 8, 2016, 11:52pm UTC](https://meta.discourse.org/t/unable-to-connect-connection-refused-due-to-https-certificates/51276 "2016-10-08T23:52:43Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![BoyanXu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/boyanxu/32/170548_2.png) [@BoyanXu](https://meta.discourse.org/u/BoyanXu)
#### Post date: [February 20, 2020, 9:24pm UTC](https://meta.discourse.org/t/unable-to-connect-connection-refused-due-to-https-certificates/51276/8 "2020-02-20T21:24:17Z")

</div>

I met exectly the same prompt from chrome.

For my case there were several configuration that was wrongly setted, some were Discourse settings, some were hosting server configuration. I post my checklist here for you as a reference:

1. Check /var/discourse/containers/app.yml

(Follow this post: [Allow SSL / HTTPS for your Discourse Docker setup](https://meta.discourse.org/t/advanced-setup-only-allowing-ssl-https-for-your-discourse-docker-setup/13847) )

Make sure you either allows https/http (open the 443 port, uncomment the ssl related template config, and the Let’sEncrypted related configs), or only http request (ban the 443 port, comment out the ssl related template config and Let’sEncrypted related configs).

If any changes were made to `app.yml`, run `./launcher rebuild app` to activate the updated configs.

1. Run `./laucher logs app`.

If you failed frequently to rebuild a functional discourse server, like I did, you may at the same time had requested too much Let’s Encrypt credentials and exeeded their limit.

Then run `./laucher logs app` will print a `json.` with a 429 error included.

1. Check your `Security group` settings for your ECS server instance

In my case, `Security group` is simply a bundle of perssioned ports (for example, 80 HTTP 443 HTTPs), whichs allow you to control your server’s transportation with the outter space.

Make sure to allow the ports that are necessary for hosting discourse.

1. Check firewall settings

In my case, step 3 didn’t open the required ports for me. Something wrong happened with my firewall settings.

it’s weird that I never set the firewall for my server, but those ports were indeed opened after configured with  
`apt install firewall-cmd`  
`firewall-cmd --permanent --add-port=20-21/tcp` (… and the other ports)  
`firewall-cmd --reload`

You check the status of opened ports for your domain with some online services.

---

_[View the full topic](https://meta.discourse.org/t/unable-to-connect-connection-refused-due-to-https-certificates/51276)._
