If the LetsEncrypt certificate fails to renew in the PBX and gives a weird error message try this.
SSH into the PBX and edit the .htaccess file located at
/var/www/html
In the .htaccess file set it toHTML
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTPS} off
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/.well-known
RewriteCond %{REQUEST_URI} !^/.freepbx-known
RewriteRule ^(.*)$ https:///%{{HTTP_HOST}}%{{REQUEST_URI}} [L,R=301]