I am building a small web app for my company and currently I have this weird issue:
I have 2 instances of the web app running, one accessible through the internet and another one for internal purposes and testing only. The internal version has a public IP address though.
When I try to access the public version of the app with the Lynx command line browser I get what I am supposed to get. So far so good. Now, when I make changes to the hosts file, so that when I try to access the app I would get the 'internal' version, what comes back is again the public version.
On top of that, there seems to be a problem only with my app. Any other website is correctly blocked or redirected when I make changes to the hosts file.
Any ideas?
UPDATE 1:
I tried this:
When running getent hosts
I get the correct list from the /etc/hosts
file. When I run getent hosts www.example.com
though I get the 'outside' address, although the correction is clearly in place.