'/opt/bitnami/apache2/conf/server.crt' does not exist or is empty

Keywords: LAMP/MAMP/WAMP - AWS - How to - Permissions

Description:
In our Lightsail environment, Apache was suddenly failing to start because…

bitnami@ip-172-26-9-208:/opt/bitnami/apache2/conf$ /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf
AH00526: Syntax error on line 49 of /opt/bitnami/apache2/conf/bitnami/bitnami.conf:
SSLCertificateFile: file ‘/opt/bitnami/apache2/conf/server.crt’ does not exist or is empty

The location that server.crt is pointing to is /opt/bitnami/letsencrypt/certificates/forum.southwestern.edu.crt. The parent directory “certificates” is only accessible to root.

Previously, the command “/opt/bitnami/ctlscript.sh start” would get everything started fine. This script seems to reference another, “/opt/bitnami/apache2/scripts/ctl.sh.” In this second script, the command “/opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf” resulted in the certifcate error given above. I changed this command to “sudo /opt/bitnami/apache2/bin/httpd -f /opt/bitnami/apache2/conf/httpd.conf” (added sudo there), and now it works.

Does it make sense to do it this way, or should I fix it another way?

Thanks!
Ed

Hi @edhillis,

Can you show me the output of this command?

ps aux | grep apache

Regards,
Michiel