Error after moving from HTTP to HTTPS

I solved it. The problem was that the elastic IP was directing to the HTTP server, so SSL certificate could not be issued for it. I changed the elastic IP address to point to the HTTPS server and it works.