I think I have renewed my Letsencrypt certificate - when I try to renew again I get:
Processing /etc/letsencrypt/renewal/pathwayanalytics.com.conf
-------------------------------------------------------------------------------
Attempting to parse the version 0.17.0 renewal configuration file found at /etc/letsencrypt/renewal/pathwayanalytics.com.conf with version 0.10.2 of Certbot. This might not work.
Cert not yet due for renewal
The following certs are not due for renewal yet:
/etc/letsencrypt/live/www.pathwayanalytics.com/fullchain.pem (skipped)
/etc/letsencrypt/live/pathwayanalytics.com/fullchain.pem (skipped)
No renewals were attempted.
So I guess the certificates are renewed ok.
But the server is still showing an expired certificate on port 443 at https://crt.sh/?q=pathwayanalytics.com
I have a cron job setup but this has also failed to apply a new certificate in time:
17 */12 * * * /home/charles/certbot-master/certbot-auto renew --quiet --no-self-upgrade --renew-hook âecho â\nI have renewed the certificate located in ${RENEWED_LINEAGE} and this certificate contains the following domains ${RENEWED_DOMAINS}\n\nâ >&2â --post-hook â/opt/bitnami/ctlscript.sh restartâ
I am running a Bitnami build of Joomla! on Jessie
What am I doing wrong? Where can I find the expired certificates that are actually being used by my apache server?
Thanks for any help on this.
It did show a valid cert but when my browser still showed the old certificate I restarted apache and now the https://crt.sh/?q=pathwayanalytics.com shows just the old cert installedâŚ
Certificate now installed (apparently) but browser not receiving it...
OK, so when I edited sudo vi /opt/bitnami/apache2/conf/extra/httpd-ssl.conf I did not read the helpful README file at
/etc/letsencrypt/live/[yourdomain.com]/README:
This directory contains your keys and certificates.
privkey.pem : the private key for your certificate. fullchain.pem: the certificate file used in most server software. chain.pem : used for OCSP stapling in Nginx >=1.3.7. cert.pem : will break many server configurations, and should not be used
without reading further documentation (see link below).
and I pointed SSLCertificateFile to
"/etc/letsencrypt/live/pathwayanalytics.com/cert.pem"
rather than...
"/etc/letsencrypt/live/pathwayanalytics.com/fullchain.pem"
and SSLCertificateChainFile
"/etc/letsencrypt/live/pathwayanalytics.com/fullchain.pem"
rather than...
"/etc/letsencrypt/live/pathwayanalytics.com/chain.pem"
who was to know??!
Anyway, now I have corrected that and the crt.sh | pathwayanalytics.com shows a shiny new certificate complete with serial number etc.
BUT my browsers still show: (net::ERR_CERT_DATE_INVALID)
...and the cert serial number still refers to the old certificate.
I have cleared my browser cache and tried other browsers on VMs
sudo grep -r SSLCertificate /opt/bitnami/apache2
returns...
Binary file /opt/bitnami/apache2/modules/mod_ssl.so matches
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:# Point SSLCertificateFile at a PEM encoded certificate. If
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt"
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:#SSLCertificateFile "/opt/bitnami/apache2/conf/server-dsa.crt"
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:#SSLCertificateFile "/opt/bitnami/apache2/conf/server-ecc.crt"
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:#SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server-dsa.key"
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:#SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server-ecc.key"
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:# Point SSLCertificateChainFile at a file containing the
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:# the referenced file can be the same as SSLCertificateFile
/opt/bitnami/apache2/conf/original/extra/httpd-ssl.conf:#SSLCertificateChainFile "/opt/bitnami/apache2/conf/server-ca.crt"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:# Point SSLCertificateFile at a PEM encoded certificate. If
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:# SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:SSLCertificateFile "/etc/letsencrypt/live/pathwayanalytics.com/fullchain.pem"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:SSLCertificateFile "/etc/letsencrypt/live/www.pathwayanalytics.com/fullchain.pem"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:#SSLCertificateFile "/opt/bitnami/apache2/conf/server-dsa.crt"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:#SSLCertificateFile "/opt/bitnami/apache2/conf/server-ecc.crt"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:# SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:SSLCertificateKeyFile "/etc/letsencrypt/live/pathwayanalytics.com/privkey.pem"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:SSLCertificateKeyFile "/etc/letsencrypt/live/www.pathwayanalytics.com/privkey.pem"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:#SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server-dsa.key"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:#SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server-ecc.key"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:# Point SSLCertificateChainFile at a file containing the
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:# the referenced file can be the same as SSLCertificateFile
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:#SSLCertificateChainFile "/opt/bitnami/apache2/conf/server-ca.crt"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:SSLCertificateChainFile "/etc/letsencrypt/live/pathwayanalytics.com/chain.pem"
/opt/bitnami/apache2/conf/extra/httpd-ssl.conf:SSLCertificateChainFile "/etc/letsencrypt/live/www.pathwayanalytics.com/chain.pem"
/opt/bitnami/apache2/conf/bitnami/bitnami.conf:#SSLCertificateFile "/opt/bitnami/apache2/conf/server.crt"
/opt/bitnami/apache2/conf/bitnami/bitnami.conf:#SSLCertificateKeyFile "/opt/bitnami/apache2/conf/server.key"
/opt/bitnami/apache2/conf/bitnami/bitnami.conf:SSLCertificateFile "/etc/letsencrypt/archive/pathwayanalytics.com/cert1.pem"
/opt/bitnami/apache2/conf/bitnami/bitnami.conf:SSLCertificateKeyFile "/etc/letsencrypt/archive/pathwayanalytics.com/privkey1.pem"
/opt/bitnami/apache2/conf/bitnami/bitnami.conf:SSLCertificateChainFile "/etc/letsencrypt/archive/pathwayanalytics.com/fullchain1.pem"
This is your problem. All of your web server configurations should always point at the live versions rather than the archive versions, specifically because the live version is updated upon renewal, while the archive version is, well, an archive, and the individual files there are never updated.
#To recap, if anyone has the same issue on a Bitnami server. #Install LetEncrypt using normal procedure for your server:
#Search for the location of your live LetEncrypt .pem files:
sudo find / -name '.pemâ #they should be somewhere like â/etc/letsencrypt/live/[yourdomain.com]/â
#Edit the Default Virtual Host Conf file for Bitnami
sudo vi /opt/bitnami/apache2/conf/bitnami/bitnami.conf
#and ensure the following parameters are set/replaced to point to the cert files in the /etc/letsencrypt/live/ folder:
SSLCertificateFile "/etc/letsencrypt/live/[yourdomain.com]/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/[yourdomain.com]/privkey.pem"
SSLCertificateChainFile "/etc/letsencrypt/live/[yourdomain.com]/chain.pem"
SSLCertificateFile "/etc/letsencrypt/live/[www.yourdomain.com]/fullchain.pem"
SSLCertificateKeyFile "/etc/letsencrypt/live/[www.yourdomain.com]/privkey.pem"
SSLCertificateChainFile â/etc/letsencrypt/live/[www.yourdomain.com]/chain.pemâ
##NB #SSLCertificateFile is fullchain.pem #SSLCertificateKeyFile is privkey.pem #SSLCertificateChainFile is chain.pem
*** cert.pem is not used ***
#see
sudo vi /etc/letsencrypt/live/[yourdomain.com]/README
#for completeness do the same in
sudo vi /opt/bitnami/apache2/conf/extra/httpd-ssl.conf