Skip to content
Advertisement

Ubuntu server can be accessed from two hostnames [closed]

in our company we have a Ubuntu 16.04.5 server, where we keep our intranet website and some other simple sites. All works good, but we can access the server using two names like – http://server/website/ and http://server1/website/ . I checked all apache2 files and all host files and I did not find anything related to the name server1, only hostname server. Maybe someone can help me figure out where something like this is configured on how to turn it off.

Advertisement

Answer

For me this is normal situation. You have configured one site on this machine. But your DNS server have two records for the IP of the machine. And when you reach apache via first hostname you get the site as it is defined. When you reach the machine via second hostname apache check the hosts defined and see there is no special definition for this hostname and serve the request with first configured host.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement