Webmin login will for some unknown reasons take me to the first website/virtual host.
Since I am using Webmin for quite a time now and as it happens with every open-source tool, you come across something that frustrates you because you remember you didn’t change anything but later you find out that it was you who did that little change and now you are snatching your hair in order to find out what went wrong.
Using open-source software like Virtualmin is both satisfying and troublesome. Why troublesome? well because support is all depended on the community and you have to be lucky that others have also faced the same or similar issue. Your second option is to post it in the forums or try out different ways yourself to dig out the root cause of the issue.
To be honest I am pretty lazy when it comes to posting to forums. Or maybe I hate the wait. So I went with the only option I had, find out myself.
Turns out the problem was with Cloudflare messing with the LetsEncrypt SSL. So if you are behind Cloudflare, try changing the cloud icons to grey for the record that is responsible for the website login. (which means Cloudflare won’t work).
Alternatively, you can turn off SSL for the whole domain. or disable SSL just for that particular record using page rules.