I’ve always used the self signed certificates for webmin and usermin access. I just accept the warning in Chrome and proceed, always worked for years.
Recently Chrome wont do it. It says “You cannot visit www.xyz.com right now because the website sent scrambled credentials that Chrome cannot process”
So I tried adding the hostname as a virtual server, then adding Lets Encrypt. That works when visiting the hostname in the browser. But when I copy it to Webmin and Usermin, it doesn’t work for those. It still shows its Not Secure in Chrome.
This is on many of my severs, I have tried in the past to do it for others and gave up.
Recently I started manually messing with moving certificates around in the file system, and editing config files, from some instructions on other websites, but this did not seem right.
So I wondered, what is the proper way to get this to work? I would think Copying to Webmin and Usermin should just make it work right away, but it never does, so what other steps are needed?
The way I do it is
- My server uses a FQDN server.mydomain.com and for the mail mail.mydomain.com
- I set up a virtual server using mydomain.com and generated a cert to cover the 2 domains above plus mydomain.com and www.mydomain.com using Certbot.
- You do not need to copy the cert files but just point to them in Webmin, Usermin, Postfix and Dovecot i.e. /etc/letsencrypt/live/mydomain.com/privkey.pem and /etc/letsencrypt/live/mydomain.com/cert.pem and /etc/letsencrypt/live/mydomain.com/fullchain.pem (where needed)
- I created a script and cron job which runs once a week to renew all server certificates after which you just need to restart Apache plus other services if the main server domain cert has been renewed which is only every 3 months. The script emails me telling me which domains have been updated.
N.B. Using certbot and an automated script for renewal is much easier BUT beware if you start using certbot then you can no longer create or renew certs via the Virtual servers Let’s Encrypt function.
Also if you need Python 2.7 you can use Software Collections as updating the main version certainly on Centos 6 will kill your server as you will no longer be able to use Yum.
Is possible without use Cerbot,. Use instead acme.sh
Webmin hostname SSL Let’s encrypt uando acme.sh