Access to subdomain with IP address instead of FQDN

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?

SYSTEM INFORMATION
OS type and version Derbian 12
Webmin version 2.105
Virtualmin version 7.10.0
Related packages SUGGESTED

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.

Virtualmin can do pretty much everything.

Web configuration » Website options

On your personal computer, add your server’s IP address. You can even replace google.com or just type your subdomain.domain.tld

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

Why create sub2.sub1 when you can use the original subdomain? Do you realize they will have to rename it after redirecting their domain to the server?

SORRY to be confusing here — I replied in a hurry and now see the OP is dealing with just sub.domain.tld – put the line

1.2.3.4 sub.domain.tld

in your PC’s /etc/hosts file to have just your PC see the site at another IP (such as 1.2.3.4)

I wrote the same thing if you read my replies. Plagiarizing my response.