0

I used ubuntu 16.04. I configure virtual host in my system and also working properly on local host- using hostname(turboreceiver) and using ip (192.168.0.56).

when I try this in my other pc in same network

using ip(192.168.0.56) in browser in my other pc in same network they show my index.html file. using hostname(turboreceiver) in browser they are not show my index.html file.

Please suggest me where am I wrong??

  • If I understand You correctly You need to map the turboreceiver to the ip (on the second pc). You can use the /etc/hosts file for that purpose : https://askubuntu.com/questions/691293/how-to-edit-etc-hosts-file – Michal Przybylowicz Aug 31 '19 at 16:20

1 Answers1

0

The local machine will resolve the hostname via its /etc/hosts, since it has a mapping of its own hostname and IP address (usually). Others will need to contact a name server since they are unaware of a host with turboreceiver as hostname in their /etc/hosts.

The simplest non-automated way is to add a record to your /etc/hosts file:

#<ip-address>   <hostname.domain.org>   <hostname>
192.168.0.56    turboreceiver

For other ways and better explanation see this

Kulfy
  • 17,696