This may be a noob question but I'm still learning about web servers and reverse proxy setups. I have two servers running on the same network - one Tomcat and another one Nginx which I intend to use a reverse proxy server for similar Tomcat servers. My idea of introducing a reverse proxy server came up after I understood that they can be used to hide the identity of the real web server and can be used to avail other advantages like better performance and load balancing.
The issue I am facing is, the tomcat server is accessible through both IP addresses - if I use the Nginx IP, it redirects to the Tomcat FQDN (expected) but if I ping using the FQDN tomcat.domain.com, it reveals the real IP of the Tomcat server and not that of Nginx server. Effectively, my Nginx server is not serving any purpose. What am I missing here?