bitnami / vms

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

[WordPress] Let's Encrypt error on wordpress #1617

Open jumpshotink opened 1 month ago

jumpshotink commented 1 month ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

bb4000d9-b88d-b65c-5316-70ba7fb45d8d

bndiagnostic output

[Resources]

Your instance has little available RAM memory.

 total used free shared buff/cache available Mem: 975 544 64 66 366 209 Swap: 
634 152 482

You could try to increase your instance's memory. Please check your cloud provider's documentation for more information. Press [Enter] to continue:

[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 Aug 05 00:54:26.665718 2024] [proxy_fcgi:error] [pid 529859:tid 
139777506850560] [client **ip_address**:60000] AH01071: Got error 'PHP message: 
PHP Warning: Undefined array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php 
on line 173PHP message: PHP Warning: Undefined array key "HTTP_HOST" in 
/bitnami/wordpress/wp-config.php on line 174PHP message: PHP Warning: Undefined 
array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 
689PHP message: PHP Warning: Undefined [Mon Aug 05 08:55:50.881241 2024] 
[proxy_fcgi:error] [pid 529859:tid 139776564791040] [client 
**ip_address**:60000] AH01071: Got error 'PHP message: PHP Warning: Undefined 
array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 173PHP 
message: PHP Warning: Undefined array key "HTTP_HOST" in 
Press [Enter] to continue:
/bitnami/wordpress/wp-config.php on line 174PHP message: PHP Warning: Undefined 
array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 
689PHP message: PHP Warning: Undefined ar [Mon Aug 05 09:35:35.600442 2024] 
[proxy_fcgi:error] [pid 529859:tid 139777523635968] [client 
**ip_address**:28586] AH01071: Got error 'PHP message: PHP Warning: Undefined 
array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 173PHP 
message: PHP Warning: Undefined array key "HTTP_HOST" in 
/bitnami/wordpress/wp-config.php on line 174PHP message: PHP Warning: Undefined 
array key "host" in /opt/bitnami/wordpress/wp-includes/canonical.php on line 
689PHP message: PHP Warning: Undefined

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

The site works and the ssl worked in the past. The ports should be opened via Lightsail.

Describe your issue as much as you can

We were using a paid for SSL and when it expired, we switched to Let's Encrypt. We used the bncert tool. It installed but with errors. It couldn't access the .well-known folder so it could setup the automatic renewal. We ran the bndiagnostic tool and received the above.

Not sure why we got an issue regarding the ports. The ports seem to be opened via Lightsail configuration.

jotamartos commented 1 month ago

Did you take a look at the wp-config.php file and check the configuration of the HTTP_HOST parameter?

[proxy_fcgi:error] [pid 529859:tid 139776564791040] [client 
**ip_address**:60000] AH01071: Got error 'PHP message: PHP Warning: Undefined 
array key "HTTP_HOST" in /bitnami/wordpress/wp-config.php on line 173PHP 
message: PHP Warning: Undefined array key "HTTP_HOST" in 

You can try setting the hostname by following this guide

https://docs.bitnami.com/general/apps/wordpress/administration/configure-domain/

If you continue running into issues with bncert, you can try the alternative approach

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

jumpshotink commented 1 month ago

Thanks. We changed the wp-config.php to use the domain name but after running the bncert-tool again, we received the same error:

Error: Error running curl -L 
'https://www.internationalbeitdin.org/.well-known/11e352a7b9' -o 
'/tmp/11e352a7b9':   % Total    % Received % Xferd  Average Speed   Time    Time 
    Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Are we missing something else? Thanks.

jotamartos commented 1 month ago

I just saw that the certificate for your site is valid since Aug 13th, did you manage to solve the issue?

jumpshotink commented 1 month ago

Unfortunately, no. There are still errors on https://decoder.link/sslchecker. And when we tried installing it again with the bncert-tool, we got the same errors as above. We will try to install it using the alternative approach.

jotamartos commented 3 weeks ago

Those errors are probably related to the SSLCACertificateFile related configuration. Let's Encrypt also generates a CA cert in the same folder where the certificates are created so you can configure Apache it. You can learn more about this directive here:

https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslcacertificatefile

github-actions[bot] commented 1 week ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

jumpshotink commented 1 week ago

Thanks for the reference to the link (https://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslcacertificatefile) - but I am not sure how to resolve this. Any additional help is appreciated.

jotamartos commented 1 week ago

I'm sorry but you should try to find someone in your community who can help you configure the SSL certs. As I mentioned before, if the bncert tool is not working for you, you can always follow the manual approach explained here

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