Error with Apache in AWS. Website is down with possible SSL error(?)

Keywords: WordPress - AWS - Technical issue - Services (Apache, MariaDB, MySQL…)

bnsupport ID: e572211b-e591-1bc3-1240-0a79601b630f

bndiagnostic output:

? Apache: Found possible issues
? Connectivity: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: I do not know how to perform the changes explained in the documentation

Description:
Hello! My website went down and i tried to restart the apache server. Got error message for syntax error and SSLCertificateFile not exist when i run the bndiagnostic-tool.

The Apache configuration has errors:

AH00526: Syntax error on line 73 of 
/opt/bitnami/apache2/conf/bitnami/bitnami.conf: SSLCertificateFile: file 
'/opt/bitnami/apache2/conf/aquagarden.gr.crt' does not exist or is empty

Anynone that has any idea about it?

Thank you :)

Hello @Stergios,

As the error says, your file /opt/bitnami/apache2/conf/aquaXXX.XX.crt does not exist. It is a symbolic link to /opt/bitnami/letsencrypt/certificates/aquaXXX.XX.crt. You need to regenerate it.

https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/

I hope it helps

Hello and thanks for your reply, i checked your article but if i try to do anything related to generate a new certificate i still get the same error.
I also tried to remove the ‘/opt/bitnami/apache2/conf/aquagarden.gr.crt’ and ‘/opt/bitnami/apache2/conf/aquagarden.gr.key’ manually from bitnami.conf. That resulted in Syntax OK but httpd could not be started, so i rolled back my change.

Problem still persists.

Hello @Stergios,

Did you check the troubleshooting section?
https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/#troubleshooting-122

It suggests run these commands to start the process from scratch, Could you try running them?

rm -rf /opt/bitnami/letsencrypt
sudo mv /opt/bitnami/apache2/conf/server.crt.old /opt/bitnami/apache2/conf/server.crt
sudo mv /opt/bitnami/apache2/conf/server.key.old /opt/bitnami/apache2/conf/server.key
sudo mv /opt/bitnami/apache2/conf/server.csr.old /opt/bitnami/apache2/conf/server.csr
sudo /opt/bitnami/ctlscript.sh restart

Regards

Hello @davidg!
I did the procedure you suggested but unfortunately result is the same when i try to restart
Apache. :confused:

Hello @Stergios,

Apart from those steps, revert the lines in /opt/bitnami/apache2/conf/bitnami/bitnami.conf to:

SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt"
SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"

I hope it helps

Hello @davidg,

I replaced the lines in /opt/bitnami/apache2/conf/bitnami/bitnami.conf and run the commands again.
Problem persists:

If it helps, here are the contents of /opt/bitnami/apache2/conf/bitnami/bitnami.conf :

Hello @Stergios,

It is probably due to the fact they are symbolic links. you can check it with:

ls -larth /opt/bitnami/apache2/conf/server*

You would need to create new certificates manually.
https://docs.bitnami.com/aws/apps/wordpress/administration/create-ssl-certificate-apache/

After that, you should be able to start Apache and retry the letsencrypt process.

Regards

Hello again @davidg!

Running the commands you said i get these results :

Hello @Stergios,

Before executing OpenSSL commands, please remove server.crt and server.key files

Regards