Webmin ssl (broken) on subdomain of a virtualmin (vserver) domain

SYSTEM INFORMATION
OS type and version Ubuntu Linux 22.04.3
Virtualmin version 7.7

I had the webmin under webmin.mydomain.com with a valid ssl and after i add the mydomain.com in virtualmin as vserver, then the webmin on webmin.mydomain.com inherits the mydomain.com ssl. So, webmin ssl breaks down on (my) port 10000.
I tried to re-request the Lets Encrypt at webmin and nothing changed… broken ssl again.

Is there any solution for that?
Thank you.

Solution found!

Into /etc/webmin/miniserv.conf exists the ssl paths of webmin and all of the domains from virtualmin (vservers) too.
So, if there is a record for *.mydomain.com then webmin uses that ssl instead of the webmin native paths.

  • The webmin’s ssl paths are stored in variables below
keyfile=/etc/webmin/letsencrypt-key.pem
certfile=/etc/webmin/letsencrypt-cert.pem
extracas=/etc/webmin/letsencrypt-ca.pem
  • The domains’ ssl paths are stored in variables below
ipcert_adomain.com,*.adomain.com=/etc/ssl/virtualmin/{ID}/ssl.cert
ipkey_adomain.com,*.adomain.com=/etc/ssl/virtualmin/{ID}/ssl.key 
ipextracas_adomain.com,*.adomain.com=/etc/ssl/virtualmin/{ID}/ssl.ca

So, if you have a vserver with a domain (eg. mydomain.com) that a subdomain of it is used for webmin (eg. webmin.mydomain.com) then you need to create 3 records on the bottom of the file (after the mydomain.com vserver ssl paths) identical with the vserver domains’ ssl patterns. So, i added the following…

ipcert_webmin.mydomain.com,webmin.mydomain.com=/etc/webmin/letsencrypt-cert.pem
ipkey_webmin.mydomain.com,webmin.mydomain.com=/etc/webmin/letsencrypt-key.pem
ipextracas_webmin.mydomain.com,webmin.mydomain.com=/etc/webmin/letsencrypt-ca.pem

And then the webmin.mydomain.com has its own records. After that all works fine for me; webmin.mydomain.com & mydomain.com has valid ssl!

Be aware

  • use the above if you are know what you are doing.
  • use with your own responsibility.
  • edit the file as root.
  • restart webmin after the edit.
  • assuming that the Webmin has a success Lets Encrypt request.
  • for now i do not know if it is permanent. i have not tested it further.

Hope it helps!
Giannis

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.