Now I have some websites on an old server that I need to transfer to Virtualmin where I’m already installing the content.
Domains currently resolve to the old server’s IP address; only when I have transferred everything will I change it to point to the new server.
Is there a way for me to see the subdomain sub.domain.tld using the IP address?
It’s not clear what you’re suggesting.
If in hosts I enter the new IP address, this still points to the default Virtualmin page, not to the index.html page contained in the public_html folder of the subdomain.
you would use /etc/hosts as a poor man’s DNS — you would make an entry like
1.2.3.4 sub2.sub1.domain.tld
then your PC will go THERE, to your old server at 1.2.3.4, when you enter sub2.sub1.domain.tld in your browser, instead of the new server where everyone else goes to when they use the public DNS for sub2.sub1.domain.tld