Install SSL Certificate for Docker Container on EC2

0

We are running an NGINX Server on a Docker Container which is hosted on an EC2 instance. Our Domain is registered with Amazon Route 53 but it seems like, there is missing an SSL Certificate on Docker or on EC2 instance.

The message is as following when we curl our Domain -

* Connected to <<our domain>> (<<our IP of EC2 Instance>>) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to <<our domain>>:443
* Closing connection 0
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to <<our domain>>:443

it works fine on http..

I tried to install with CertBot on our Docker Container - like this Tutorial . I can't even install snapd - Unable to find package.. on updating the Debian, I get there's no updates possible..

Any Recomadations? Thanks a lot!

Flo
已提問 2 個月前檢視次數 235 次
1 個回答
0

Hello.

There is an official container image for certbot, so if you use this to issue an SSL certificate and copy the certificate to the Nginx container, you can use it with HTTPS.
https://hub.docker.com/r/certbot/certbot

profile picture
專家
已回答 2 個月前
profile picture
專家
已審閱 2 個月前
  • Or place your NGINX behind an ALB with an SSL Cert

  • I tried to place my EC2 behind an Alb with an SSL Cert - I just get an 502 Bad Gateway and don't know what happened or what cause this. I also tried to install Certbot but im not able to install this inside my Docker Container - or should this be an own Container with CertBot on it?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南