Can't start bitnami after following the Lightsail SSL tutorial

Keywords: WordPress - AWS - Technical issue - Other

bndiagnostic ID: 53db89a9-4fed-0e8c-5d14-a092ed0fb054

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
? Resources: Found possible issues
? Processes: Found possible issues

bndiagnostic failure reason: The tool could not find any issue

I have a bitnami instance running on AWS Lightsail used to host a Wordpress website.
While attempting to add a SSL certificate following this guide:
I had to stop the apache server
sudo /opt/bitnami/ stop
and when trying to start it up again with:
sudo /opt/bitnami/ start
it won’t start, it won’t.
I tried starting a new instance and doing the tutorial again but I got the exact same error.

Hi @toholderandrews,

The error is clear and the tool warned you about it

AH00526: Syntax error on line 4 of /opt/bitnami/apache/conf/vhosts/wordpress-https-vhost.conf: SSLCertificateFile: file '/opt/bitnami/apache/conf/bitnami/certs/server.crt' does not exist or is empty

If you take a look at that folder, you can find this

total 8
drwxrwxr-x 2 bitnami root 4096 Jan 12 22:17 .
drwxrwxr-x 4 bitnami root 4096 Jan  1 21:59 ..
lrwxrwxrwx 1 root    root   48 Jan 12 22:17 server.crt -> /opt/bitnami/letsencrypt/certificates/DOMAIN.crt
lrwxrwxrwx 1 root    root   48 Jan 12 22:11 server.crt.old -> /opt/bitnami/letsencrypt/certificates/DOMAIN.crt
lrwxrwxrwx 1 root    root   48 Jan 12 22:17 server.key -> /opt/bitnami/letsencrypt/certificates/DOMAIN.key
lrwxrwxrwx 1 root    root   48 Jan 12 22:11 server.key.old -> /opt/bitnami/letsencrypt/certificates/DOMAIN.key

You didn’t replace the DOMAIN placeholder and that’s why the file doesn’t exist. However, it seems the “/opt/bitnami/letsencrypt/certificates/” folder doesn’t exist so you are pointing to not existing files.

You will need to remove those files

rm -rf /opt/bitnami/apache/conf/bitnami/certs/*

and create new SSL certs inside that folder by following this documentation

Note: The guide use a different path, please use /opt/bitnami/apache/conf/bitnami/certs/ when running the commands

Once you generate those dummy certificates, please use our HTTPS configuration tool to generate the certs