Is there any way to access a site before the DNS is updated? I need to keep the site available on the other server whist working on the new one. With cPanel you can access sites using http://IP/~username format, is something similar available on Virtualmin?
Virtualmin offers a Preview Website option at Virtualmin → Web Configuration.
Of course, you can access a website hosted on Virtualmin even if the DNS of the domain points to some other IP address - just edit the host file on the PC on which you wish to access the website.
I usually create an alias in the domain and use that instead. By that I mean, create the domain as it will be when it goes into production (domain.tld) and an alias within that Virtual Server for, e.g. dev.domain.tld. You then browse to dev.domain.tld until you’re ready to switch, at which point you delete the alias and update DNS to point domain.tld to the new server.
And, as noted by calport, you can also adjust your local hosts file.
Just a reminder to clear the entries from your hosts file once teh domain points to thenew place. I always forget, and it always causes me problems “Why isn’t thist working!!!” when the site moves again months/years later and it’s in my host file still