Custom domain pointed at elastic IP does not have correct SSL certificate

Issue

This Content is from ServerFault. Question asked by Axeror

So i have this problem that is bothering me for some time. Now i created SSL certificate with LetsEncrypt and its for my custom domain. Lets say example.com. Now i have set this certificate for load balancer in EB and for listener in EC2. When i open EB enviroment domain i get that certificate is invalid. I get that bcs the certificate is for different domain and when i look at that the certificate in chrome, i see correct info. However, when i open my custom domain that is pointed to elastic IP of that EC2 instance that runs in my EB i got certificate that is not secure and its configured to dynamic url of EC2 instance…i have no idea how to set proper certificate to that elastic IP.
Does anybody have idea what to do? Here is my picture of what i see when i open certificate in chrome for that custom domain.

certificate info



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from serverfault, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?