I recently changed the hostname of my system from something.contaboserver.net to orion.somedomain.com. After that, I requested a new SSL certificate for Orion using Let’s Encrypt. However, I’m encountering an SSL error when trying to access the admin area. The issue seems to be that the certificate is invalid because the Common Name (CN) still references the previous hostname:
How did you request the certificate? Typically the best way to do so is to setup a “Virtual Server” in Virtualmin with the selected hostname, then request a certificate.
The domain that I’m trying to create certificate for is not set up as Virtual Server and not present in the virtualmin at all. The domain is: orion.somehost.com which is used as hostname of the server.
I would disable the “default hostname” feature, then simply add the system’s hostname as a Virtual Server. Ugh, that “default hostname” thing personally bothers me.
When I changed the server’s hostname from someserver.contaboservers.net to orion.somedomain.solutions, Webmin automatically created a DNS zone for the new hostname. I don’t want to set up a virtual server for orion.somedomain.solutions because I only need it to access the Webmin/Virtualmin admin panel at https://orion.somedomain.solutions:10000, and nothing more
The certificate is requested and installed successfully, but I get that annoying not secure, just because the common name of the old hostname is still in the certificate as common name
Thanks, I’m gonna loop @Ilia into the conversation as “I believe” he created the default hostname feature which is enabled by default on new VM installs. Perhaps he can shed some light on things.
It’s possible that when the default hostname was created it setup something static somewhere in the system causing this problem. Though that’s just a probability not a fact.
I believe in this too, somewhere in the configs or DNS zones ( I don’t know where exactly to seek) the hostname is still the old one, that’s why the Let’s Encrypt module is using it as CN.