bitnami / vms

Bitnami VMs
https://bitnami.com
Other
206 stars 43 forks source link

[<bitnami>] <Failed with result 'exit-code'. Happened while installing SSL on AWS. Can't relaunch apache/site> #1442

Closed bendistraw closed 6 months ago

bendistraw commented 6 months ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

e7b0b3d7-42e7-578e-c773-fa9faa8a6db4

bndiagnostic output

[Connectivity]

Server ports 22, 80 and/or 443 are not publicly accessible. Please check the following guide to open server ports for remote access:

https://docs.bitnami.com/general/faq/administration/use-firewall/

[Apache]

Found recent error or warning messages in the Apache error log.

[Mon Mar 11 14:19:14.524549 2024] [access_compat:error] [pid 300302:tid 
139846265755392] [client **ip_address**:55522] AH01797: client denied by server 
configuration: /opt/bitnami/wordpress/xmlrpc.php
 [Mon Mar 11 14:31:17.854894 2024] [access_compat:error] [pid 2875:tid 
139846483965696] [client 2604:a880:400:d0::1ed8:b001:41916] AH01797: client 
denied by server configuration: /opt/bitnami/wordpress/xmlrpc.php
 [Mon Mar 11 15:19:39.351421 2024] [access_compat:error] [pid 311872:tid 
140344926643968] [client 2a02:c206:2140:5413::1:37012] AH01797: client denied by 
server configuration: /opt/bitnami/wordpress/xmlrpc.php

Press [Enter] to continue: Please check the following guide to troubleshoot server issues:

https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro rs-apache/

The Apache configuration has errors:

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

bndiagnostic was not useful. Could you please tell us why?

I'm not sure what to do next.

Describe your issue as much as you can

Screenshot 2024-03-12 at 10 10 23

Everything seemed fine till I tried to add an SSL (which I've done other times with zero issues). It's possible it's a simple spelling error but this isn't my expertise and I'm learning as I go (sorry).

bchabot commented 6 months ago

I am also having a similar issue. Everything worked fine till creating a new SSL certificate failed and now I see almost exactly the same error.

The diagnostic bundle was uploaded successfully to the Bitnami servers. Please copy the following code:

751e20af-2ebe-19da-78a6-0aaa683fc3a0

And paste it in your Bitnami Support ticket.

The bncert-tool gives the following new error:

Press [Enter] to continue:
Warning: The web server configuration check failed. Please fix the configuration 
error: 
/bin/sh: 1: /opt/bitnami/apache/sbin/nginx: not found
Press [Enter] to continue:
mdhont commented 6 months ago

Did you change any other configuration before running the bncert tool? Did you configure an A record for the domain so it's pointing at the machine IP? It seems this file does not exist:

/opt/bitnami/apache/conf/www.tonysmith360.com.crt
bendistraw commented 6 months ago

Did you configure an A record for the domain so it's pointing at the machine IP? It seems this file does not exist:

/opt/bitnami/apache/conf/www.tonysmith360.com.crt

Would that be the Private IPv4 address or the Public IPv6 address? Should an A record just point to @ ? I can screenshot the DNS settings if that helps.

bchabot commented 6 months ago

I am also having a similar issue. Everything worked fine till creating a new SSL certificate failed and now I see almost exactly the same error.

Update: I made a snapshot, then migrated to a new Lightsail instance (2G RAM). After booting, it showed the same issue.

I fixed the minor PHP error in the WP config. Then I looked around.

Apparently, if the SSL cert tool fails, it can leave a dangling link for the certificate in /opt/bitnami/apache/conf/

I copied the old cert and key from /opt/bitnami/letsencrypt/certificates/ to the new cert path that it was looking for.

I then re-ran the bncert-tool and it exited without error. Apache was back up and running and everything seems hunky dory.

I re-ran the diagnostics tool after and aside from minor PHP code issues, everything looks OK now. fe01e3ef-584d-1680-9f14-096df9cf2332

bendistraw commented 6 months ago

I am also having a similar issue. Everything worked fine till creating a new SSL certificate failed and now I see almost exactly the same error.

Update: I made a snapshot, then migrated to a new Lightsail instance (2G RAM). After booting, it showed the same issue.

I fixed the minor PHP error in the WP config. Then I looked around.

Apparently, if the SSL cert tool fails, it can leave a dangling link for the certificate in /opt/bitnami/apache/conf/

I copied the old cert and key from /opt/bitnami/letsencrypt/certificates/ to the new cert path that it was looking for.

I then re-ran the bncert-tool and it exited without error. Apache was back up and running and everything seems hunky dory.

I re-ran the diagnostics tool after and aside from minor PHP code issues, everything looks OK now. fe01e3ef-584d-1680-9f14-096df9cf2332

Glad that worked for you! I'm not sure how to do most of that. I'm feeling I'm out of my league.

bendistraw commented 6 months ago

Solved. An independent tech rewrote the missing files.