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
gefragt vor 2 Monaten235 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
  • 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?

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen