0

This is my configuration: 1. Ubuntu 14.04 LAMPP server (localhost). 2. WiFi Access Point on ubuntu server. 3. Android device connected to WiFi access point.

I can access localhost from android device by typing IP address of my localhost. How can I access just typing the name instead of IP address? (for example myserver directly in browser bar)?

1 Answers1

0

localhost cannot be accessed over a network because the IP [127.0.0.1] is parsed before the NIC. To quote Wikipedia on localhost: "Such packets are never delivered to any network interface controller (NIC) or device driver, which permits testing of software in the absence of any hardware network interfaces."

[It is possible to give localhost a different IP address using the hosts file, which might be done for test purposes, but that would lead to issues if left in place.]

DrMoishe Pippik
  • 29,631
  • 5
  • 41
  • 58