NGINX as a reverse proxy? You may be able to redirect based on IP location (though would require checking), but you'd definitely be able to redirect based on sub domain.
I currently use it in conjunction with Lets Encrypt/Certbot to provide a certificate and to direct to client specific login pages based on their sub domain.