BACKGROUND:
I will be setting up two servers on a hosted platform. I plan to use NGINX as a front-end proxy for APACHE. Let's call the two servers App Server 1 and App Server 2. I also have a server on another hosting platform and that has my home page. Let's call that OUTSIDE Server. App Server 1 and App Server 2 will house the application. When the user clicks on the sign in button on the OUTSIDE Server, the user will be redirected to App Server 1. Basic round-robin load balancing through NGINX on App Server 1 will assign the user to sign in on either that server (App Server 1) or on App Server 2.
QUESTIONS:
(1) I want to only allow App Server 1 to accept traffic coming from either OUTSIDE Server or App Server 2. Even if the user had bookmarked App Server 1, they will need to go back thru OUTSIDE Server to sign in. How do I do this with NGINX?
(2) Very similar issue with App Server 2, except that it can only have traffic coming from App Server 1. How do I do this with NGINX?
Thanks for any suggestions!