# Error after moving from HTTP to HTTPS

**URL:** <https://meta.discourse.org/t/error-after-moving-from-http-to-https/68909>\
**Category:** Self-hosting\
**Tags:** letsencrypt\
**Created:** [August 28, 2017, 8:39am UTC](https://meta.discourse.org/t/error-after-moving-from-http-to-https/68909 "2017-08-28T08:39:36Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Idan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/idan/32/198212_2.png) [@Idan](https://meta.discourse.org/u/Idan)\
**Post date:** [August 28, 2017, 8:39am UTC](https://meta.discourse.org/t/error-after-moving-from-http-to-https/68909/1 "2017-08-28T08:39:36Z")

</div>

I’ve followed the [LetsEncrypt installation procedure](https://meta.discourse.org/t/setting-up-lets-encrypt/40709) for installing SSL for my website.

**What I did:**

- Created an image of the original Discourse forum (EC2 AMI)
- Launched it again
- Checked that it works (it did)
- Followed the installation procedure and rebuilt the app
- Tried to access the app via HTTPS and also via HTTP, neither worked. I got "“This site can’t be reached” error in Chrome

**In the logs:**

`nginx: [emerg] PEM_read_bio_X509_AUX("/shared/ssl/sub.domain.com.cer") failed (SSL: error:0906D06C:PEM routines: PEM_read_bio_no start line: Expecting: TRUSTED CERTIFICATE)`

That error repeat itself several times in the log.

When I check the certificate in the` /var/discourse/shared/standalone/ssl` directory, I see that it is **empty**.

I also checked the **acme.sh.log** and there is shows:

`Invalid response from http://forum.example.com/.well-known/acme-challenge/xxxxxxxxxxxx-xxxxxxx`

I believe that during that command, the server wasn’t accessible via HTTP as it wasn’t even available after the rebuild of the app as well.

I have root access to the AWS EC2 server via SSH.

Help would be greatly appreciated. Thanks.

---

_[View the full topic](https://meta.discourse.org/t/error-after-moving-from-http-to-https/68909)._
