I followed the official docs by running these commands and everything works fine until i run the last command below
sudo certbot --apache
After running this command, i got this error.
An unexpected error occurred:
The server experienced an internal error :: Error retrieving account “https://acme-v02.api.letsencrypt.org/acme/acct/69870145”
Please see the logfiles in /var/log/letsencrypt for more details.
IMPORTANT NOTES:
Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
By visiting the link above, i got this full details error message.
{
“type”: “urn:ietf:params:acme:error:malformed”,
“detail”: “Method not allowed”,
“status”: 405
}
I meant to say that if you run certbot --apache a few times, it might work the second time. i.e. the issue with your account might have been temporary.
But if it fails consistently, then try using a different account, by following my earlier suggested instructions.
I removed some expired domains on server and run “sudo certbot --apache” again and it installed successfully. However, all the websites are not able to display after choosing
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you’re confident your site works on HTTPS. You can undo this
change by editing your web server’s configuration.
I think you will need to check with your cloud provider to see how you can unblock port 443. Something like this - https://www.alibabacloud.com/help/doc-detail/25471.htm - but I’m not sure whether it’s applicable to the hosting product you use.