0

The home net structure is simple.
Two devices(a pc and an android mobile phone) connected to the wireless router.
Wireless router'ip is 192.168.1.1.
Pc'ip is 192.168.1.176.(dhcp)
Mobile phone'ip is 192.168.37.(dhcp)
There is a wordpress build on the pc.

cat  /etc/hosts
127.0.0.1   localhost
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.0.1  hwy.local
127.0.0.1  www.hwy.local

When to input hwy.local/wp or www.hwy.local/wp ,my pc can login the wordpress.
The mobile phone can connect internet when to input yahoo.com in its firefox.
Why can't longin my wordpress in local pc(192.168.1.176) when to input hwy.local/wp or www.hwy.local/wp in mobile phone 's firefox?

enter image description here

  • 4
    I'm voting to close this question as off-topic because it has nothing to do with Unix&Linux and should be asked on SuperUser. – dr01 Feb 1 '17 at 13:37
1

Because your mobile phone doesn't know how to reach that "domain name". Only your PC knows how to reach it because you added it in the hosts file.

You should be able to reach it from your mobile phone using the IP address (192.168.1.176/wp) of your PC.

You need a DNS server in your network and configure the domain in it if you want to be able to load it from all your LAN devices using a domain name.

  • can i set a dns server in my wireless router? – it_is_a_literature Feb 1 '17 at 12:48
  • It depends on your router, which is the model? And which OS? – Alberto Méndez Feb 1 '17 at 12:51
  • asus , RT-AC51U – it_is_a_literature Feb 1 '17 at 13:36
  • It is a bit hard to tell you if you can do it knowing only the model name, look through the options. It seems you could install OpenWRT but it isn't easy and you should be careful. It should be easier to install it in your own PC where do you have the Wordpress installed – Alberto Méndez Feb 1 '17 at 15:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.