I have one server Server-1 where my app server is running.
In Server-2 I want to set up my Nginx to act as a reverse proxy for my app server.
Traffic--->Server-2(with Nginx reverse proxy)--->Server-1(with server)
1) You should add location that will be redirecting all traffic from Server-2 to Server-1, e.g.:
server {
listen 80;
server_name Server-2.com;
location / {
proxy_pass http://Server-1.com/;
}
}
2) Try load http://Server-2.com page and if everything fine, you will get response from your app on Server-1.com