Error with AWS Lightsail + Wordpress Multisites + Let's Encrypt Certbot

Keywords: WordPress Multisite - AWS - Technical issue - Secure Connections (SSL/HTTPS)

bnsupport ID: 49742f9b-46bf-dda1-80ba-1a10b047f270

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
? Resources: Found possible issues
? Processes: Found possible issues
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: The documentation did not make any significant change

Description:
Hi, recently I’ve created an AWS Lightsail instance of Bitnami’s WordPress Multisites and I need to enable SSL encryption for my websites.

At first, I’ve tried to use the bncert tool, but apparently it’s not working for me because the website is using Cloudflare proxy, and it’s not supported by the bncert tool.

So I go for the manual solution, using the Let’s Encrypt Certbot. I’ve been following this tutorial provided by AWS Lightsail: https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-using-lets-encrypt-certificates-with-wordpress

Following the tutorial above, I’m having some issues in the Item 6 of Step 7, where is necessary to restart the Apache server using the command:
sudo /opt/bitnami/ctlscript.sh start

It prompts an error:
Job for bitnami.service failed because the control process exited with error code.
See “systemctl status bitnami.service” and “journalctl -xe” for details.

I need your help to solve it.

Thanks in advance, waiting your reply.

Hi @Dr_Geraldo_Augusto,

You created symlinks to non-existing files

apache/conf/bitnami/certs:
total 8
drwxrwxr-x 2 bitnami root 4096 Dec 22 12:54 .
drwxrwxr-x 4 bitnami root 4096 Dec 20 21:21 ..
lrwxrwxrwx 1 root    root   48 Dec 22 12:54 server.crt -> /opt/bitnami/letsencrypt/certificates/DOMAIN.crt
lrwxrwxrwx 1 root    root   48 Dec 22 12:47 server.crt.old -> /opt/bitnami/letsencrypt/certificates/DOMAIN.crt
lrwxrwxrwx 1 root    root   48 Dec 22 12:54 server.key -> /opt/bitnami/letsencrypt/certificates/DOMAIN.key
lrwxrwxrwx 1 root    root   48 Dec 22 12:47 server.key.old -> /opt/bitnami/letsencrypt/certificates/DOMAIN.key

First of all, DOMAIN is a placeholder you need to replace with your real domain. However, it seems you didn’t create any certificate inside the /opt/bitnami/letsencrypt/certificates/ folder.

You will need to remove those files and generate new dummy ones for Apache to work again

sudo rm -rf /opt/bitnami/apache/conf/bitnami/certs/server*
sudo openssl genrsa -out /opt/bitnami/apache/conf/bitnami/certs/server.key 2048
sudo openssl req -new -key /opt/bitnami/apache/conf/bitnami/certs/server.key -out /opt/bitnami/apache/conf/bitnami/certs/cert.csr
sudo openssl x509 -in /opt/bitnami/apache/conf/bitnami/certs/cert.csr -out /opt/bitnami/apache/conf/bitnami/certs/server.crt -req -signkey /opt/bitnami/apache/conf/bitnami/certs/server.key -days 365
sudo /opt/bitnami/ctlscript.sh restart apache

Happy to help!


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.