not really an nginx question, it's more about name resolution.
On the VPS, there are two things I'd suggest. (1) use Name Service Switch to tell the VPS to first look in the hosts file. or (2) use DNSmasq to do the same. DNSmasq is useful, you can make aliases for domains ie test1.do.main test.do.main etc
Then you need to the client to send HTP packets that way (1) route them using a VPN so the addresses in DNSmasq or hosts are VPN addresses or (2) run a SOCKS SSH tunnel to the VPS and switch with a manual config, a PAC file or an extension like SwitchyOmega on Chrome.
That's just how I do it, raw suggestions without blow-by-blow configs
Personally on my desktop I have Chrome with SwitchyOmega running over an SSH tunnel to a VPS. But I use VPN sometimes as well.
On the VPS, there are two things I'd suggest. (1) use Name Service Switch to tell the VPS to first look in the hosts file. or (2) use DNSmasq to do the same. DNSmasq is useful, you can make aliases for domains ie test1.do.main test.do.main etc
Then you need to the client to send HTP packets that way (1) route them using a VPN so the addresses in DNSmasq or hosts are VPN addresses or (2) run a SOCKS SSH tunnel to the VPS and switch with a manual config, a PAC file or an extension like SwitchyOmega on Chrome.
That's just how I do it, raw suggestions without blow-by-blow configs
Personally on my desktop I have Chrome with SwitchyOmega running over an SSH tunnel to a VPS. But I use VPN sometimes as well.