Sample Header Ad - 728x90

localhost not working when using wi-fi hotspot on Iphone 4

0 votes
2 answers
2381 views
I've just moved out of an office where localhost would load a web application I am working on (apache2). I used the buildings wi-fi when at the office. Now I am using a wi-fi hotspot on iPhone 4 in another building and typing localhost in both Chrome and Firefox loads a page of google search results, rather than the web application. Is this a "known issue" that localhost operates differently when connected to an iPhone hotspot via wi-fi? And if so, how do I get localhost to work as per usual? **System Info** Operating System: Linux Mint 17.2 Cinnamon 64-bit Cinnamon Version: 2.6.13 Linux Kernel: 3.16.0-29-generic iPhone: 4 iOS: 7.1.2 (11D257) **Update/Solution** Sorry, I think the addition of detail distorted my presentation of what the issue actually was. I rephrased the issue as: "Why can't I access localhost without an internet connection". And found this solution, which worked: https://askubuntu.com/a/2983 Check that you have this line in /etc/hosts: 127.0.0.1 localhost If it is not there, add it. Thanks for your efforts in providing a solution though, I'm sure I and others will be able use the information in the future.
Asked by user1063287 (341 rep)
Nov 8, 2015, 10:15 AM
Last activity: May 3, 2025, 05:05 AM