manually using certbot with VM

1 post / 0 new
#1 Mon, 04/22/2019 - 19:37
edwardsmarkf

manually using certbot with VM

hello -

i had some issues initially using lets-encrypt with virtualmin when i was first converting sites over to https. so what i did was just manually run certbot on the command line, then go into httpd.conf and edit-change:

SSLCertificateFile /home/ilovevirtualmin.com/ssl.cert
SSLCertificateKeyFile /home/ilovevirtualmin.com/ssl.key


to:

SSLCertificateFile /etc/letsencrypt/live/ilovevirtualmin.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ilovevirtualmin.com/privkey.pem
SSLCACertificateFile /etc/letsencrypt/live/ilovevirtualmin.com/chain.pem


This approach has worked fine for some time now, but today i received this error:

Apr 22 18:31:11 mydomain.info systemd[1]: Starting Webmin...
Apr 22 18:31:11 mydomain.info start[30852]: Starting Webmin server in /usr/libexec/webmin
Apr 22 18:31:11 mydomain.info start[30852]: Failed to open SSL cert /home/ilovevirtualmin.com/ssl.cert at /usr/libexec/webmin/miniserv.pl line 4436.
Apr 22 18:31:11 mydomain.info systemd[1]: webmin.service: control process exited, code=exited status=2
Apr 22 18:31:11 mydomain.info systemd[1]: Failed to start Webmin.
Apr 22 18:31:11 mydomain.info systemd[1]: Unit webmin.service entered failed state.


i did finally find the original "ssl.cert" file and restored it to its original position, so that appears to have fixed the startup issue.

is there any way i can tell virtualmin where the cert files are, if they are someplace different then where virtualmin specified?

i was playing around with:

ln --symbolic


but was hoping maybe there is some way to override where virtualmin usually expects to find these files.

thank you very much.