Unable to install letsencrypt on aws ec2 centos server

I tried finding solutions on this issue in your forum’s earlier asked questions, but could not find one. Server is hosted on AWS EC2 with Centos 7 OS and Apache web server. We tried installing letsencrypt ssl certificate on two of our domains using certbot command on our putty cli, but failed.

We installed certbot lib on our server and thereafter ran certbot --apache to install the letsencrypt ssl certificate on our domain:mbracecloud.com, but the following error showed up.

Domain: mbracecloud.com
Type: unauthorized
Detail: The key authorization file from the server did not match
this challenge
“cHozU_gnXa5xmq_OKmEUXIpeSIMqbO84E63W8czHFpg.szY6-AYUQfZteVJvsSQS8mBI_LYBXbzqtcujWz1Y2w0”
!=
“cHozU_gnXa5xmq_OKmEUXIpeSIMqbO84E63W8czHFpg.b1ueSfzgphVxkAVT_rW79i2PIYT4yf94ajzc-M6EiyM”

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.

How shall we overcome this.

It looks like you succesfully got a certificate for that hostname this morning.

Well it seems right, but our domain: http://mbracecloud.com is not working as https now. You can check it now. I’m not sure where i’m going wrong. Help would be appreciated.

The HTTPS version - https://mbracecloud.com/ works just fine for me.

In any case, that domain is hosted by an nginx server. Running certbot --apache isn’t going to do any good.

Update.
Its working. Thanks for the help. By the way, how do we make sure we renew our ssl certificate before it expires.

Depending on how you installed certbot there’s already a systemd timer or cronjob set up or you need to add a systemd timer or cronjob with certbot renew.