By default, Virtualmin uses HTTPS and port 10000. However, the SSL installed is just a self-signed certificate. This explains why you are getting the “Not Secure” message on your hostname URL as shown below:
To go about this, let us add Let’s Encrypt SSL and change the port number to your desired port. To do so, let us add the primary domain in Virtualmin Virtual Server.
Let us get started!
Add a domain name.
Click on Create Virtual Server, then complete the form as shown below, just ensure to enable the Setup SSL website too?, then Create Server.
Add your host name as a sub server for your main domain.
This time, let us add a sub domain from your main domain. The sub domain would be your host name. In our case, this will be panel.kurtobando.tk. Just ensure to enable the Setup SSL website too?, then Create Server.
Add Let’s Encrypt SSL to your host name.
Let us add LE SSL to panel.kurtobando.tk. To do so, Click Virtualmin > Choose your hostname > Server Configuration > SSL certificate. You may refer to the screenshot below:
Click on Stop SSL Certificate Sharing.
From here, choose Let’s Encrypt > Domain names listed here > Enter your host name in my case, this will be panel.kurtobando.tk. Click on Request Certificate.
From here, Click Virtualmin > Choose your hostname > Server Configuration > SSL certificate. Then let us use the hostname SSL for our Webmin, Usermin, Dovecot, Postfix, and ProFTPD.
From here, you may get the error message below:
Do not panic, just close your browser and re-open your panel URL. This time, this should work as expected, as shown below:
If you reach to this stage. Congratulation. Next stop, let us change the port 10000 to our desired port. In my case, I will use port 2087.
Change Virtualmin Port.
By default port 10000 is Virtualmin go to port. In my case, I would like to change this to 2087, given the said port is also supported in Cloudflare. If you have hesitation, see the link below:
Let us get this started! Click on Webmin > Webmin> Webmin Configuration > Port and Addresses.
In my case, I use 2087 as shown below:
Feel free to remove the port 10000 if you have successfully visit your working port as shown below:
At this point. You should be all set.