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 soby alpine.link - How to...