amazon-lightsail-developer-guide icon indicating copy to clipboard operation
amazon-lightsail-developer-guide copied to clipboard

Error trying to update Let's encrypt certificate - sudo /opt/bitnami/ctlscript.sh start NOT WORKING

Open makerovski opened this issue 4 years ago • 2 comments

Hello everybody,

I used the following guide, updated on December 20, 2021, as the tutorial says, I tested my instance and got the approach A, but it doesn't work. https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-wordpress#complete-the-prerequisites-lets-encrypt-wordpress

err

I had this issue before and it was solved following this solution: https://github.com/awsdocs/amazon-lightsail-developer-guide/issues/63

But it does not work anymore, when I try this one I get this error:

ERR2

That's my Apache config. :

apache

Thank you for your help.

makerovski avatar Jan 17 '22 09:01 makerovski

Any solution on this?

donmb1 avatar Feb 11 '22 07:02 donmb1

You must identify whether to use "approach A" or "approach B", but you also must identify if you have an instance that uses the Debian version of Linux (newest instances), or the Ubuntu version of Linux (older instances).

There have been a few variations of the Bitnami WordPress image available over the years, and each version requires a different set of steps. I suspect this issue happens because the cert files are in the wrong directory. Your certs could be stored in any of the following three directories:

  1. Approach A: /opt/bitnami/apache2/conf/bitnami/certs/
  2. Approach B: /opt/bitnami/apache2/conf/
  3. Older "Ubuntu" instances: /opt/bitnami/apache/conf/bitnami/certs/

The symlinks that you create (or already created) using the following commands must point to the correct directory where certs are stored on your instance. You must replace /path/to/certs/directory/ with the correct directory path where certs are stored on your instance.

  • sudo ln -sf /etc/letsencrypt/live/$DOMAIN/privkey.pem /path/to/certs/directory/server.key
  • sudo ln -sf /etc/letsencrypt/live/$DOMAIN/privkey.pem /path/to/certs/directory/server.crt

Try to identify where certs are stored on your instance, and then create the symlinks in those directories. If you continue having issues, you should open a ticket with AWS support. They are able to provide more guided assistance.

rlatino avatar Feb 11 '22 15:02 rlatino