redirecting website from one server to another

hello -

i have a website that currently lives on one IP and i wish to temporarily test it on another IP.

the “A” record TTL is set down to one minute, but i have noticed that not all entities involved notice the IP number change very quickly, so i am assuming with something as powerful as virtualmin, i can have a “stealth” redirect that i have full control over.

in other words, for example i have the domain name http://virtualminrocks.com/ and it currently lives on 199.231.100.100. i want to try out http://virtualminrocks.com on a new server at 199.231.123.123 without having to depend on “A” record settings.

ProxyPass did not seem to work the way i had hoped, as that would just redirect a URL such as http://virtualminrocks.com/ to a IP URL such as: http://199.231.123.123/

thank you.

Howdy,

A good way to do that is to use an alias.

Is there a domain name on this new server which is currently working? If so, you could use that working domain, and create an alias using it that points to your website with the DNS that isn’t working yet.

This here shows some additional details:

https://www.virtualmin.com/documentation/web/faq#toc-how-do-i-make-domains-available-before-the-dns-changes-a-F7zN_4Bv

A fine way to temporarily point a domain name at a different IP is to simply modify your HOSTS file so that your workstation alone resolves
199.231.123.123 virtualminrocks.com
Your browser will then happily send http headers to that IP, requesting virtualminrocks.com, and if that test server has such a domain living on it, it’ll accept the request and send you your web page.