`localhost` usually refers to the special addresses `127.0.0.1` and `::1` that map to a loopback device, which allows a computer to connect to itself.

learn more… | top users | synonyms

59
votes
6answers
24k views

Why is localhost IP 127.0.0.1?

I wondered what is the origin of the decision to make localhost's IP address 127.0.0.1. What is the "meaning" of 127? what is the "meaning" of 0.0.1?
38
votes
2answers
12k views

Why is my “localhost” not 127.0.0.1? [duplicate]

When I use the Ping command to ping my localhost, it doesn't show up as 127.0.0.1. C:\Windows\system32>ping localhost Pinging GIGA [::1] from ::1 with 32 bytes of data: Instead, it shows up ...
27
votes
6answers
25k views

Why is there a difference between ping “localhost” and ping “local IP address”?

Using cmd and ping on Windows gave me the following results: Pinging "localhost": Pinging "192.168.0.10" (local IP address): Aren't both situations exactly the same? I mean, I'm pinging ...
17
votes
3answers
4k views

IE doesn't work with localhost + port

I have a NodeJS server running on my local machine for development purposes. By default, it uses port 1337. (I've tried a handful of other ports such as 8080, 1234, 9000, 9090, 65432 et al). I can ...
15
votes
1answer
7k views

Google Chrome is slow to localhost

For some reason Google Chrome is slow when I'm working against localhost. I had the same problem in Firefox 3.5 but I changed some IPv6 setting in about:config which fixed the issue. I think the same ...
14
votes
3answers
19k views

Is there a way to disable IPv6 in Google's Chrome?

I'm developing websites in a Windows 7 machine. When I've installed Firefox I've found some performance issue specially on connecting to the localhost, googling around I've discovered that it's ...
10
votes
5answers
11k views

How does localhost 127.0.0.1 work?

I found some articles related to this, but they were not sufficient for me. I want to know how the localhost works and why is it the same on many different machines? How does the localhost block the ...
10
votes
1answer
2k views

Why is “It works!” showing up at my http://127.0.0.1 (localhost)?

So, I was playing around with Java sockets, servers and streams, the other day, and I decided, purely out of curiosity, expecting no good results, to open Google Chrome and navigate to 127.0.0.1, and ...
10
votes
3answers
7k views

How to prevent Firefox converting 'localhost/*' URLs into search queries?

Since upgrading from Firefox 3.6.x, my address bar has a quirk that never used to be there. When I type in, for example: localhost/my_dir/index.php Firefox turns it into a search query, my search ...
10
votes
5answers
29k views

How to SSH to localhost without password?

EDIT: Putting exactly what was done. I need to SSH to localhost without a password, the usual way of doing it (with public keys) do not work. user@PC:~$ rm -rf .ssh/* user@PC:~$ ssh-keygen -t rsa ...
9
votes
3answers
1k views

Isn't localhost simply 127.0.0.1 on Mac OS X 10.7 (Lion)?

I tried telnet localhost on Mac OS X Lion, and this is the output I got. Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... telnet: connect to address ...
9
votes
1answer
1k views

Curl local host names on Mac OS X Yosemite

I just upgraded from Mavericks to Yosemite, and now curl can't see loopback host names. Set up a simple http server to test: $ python -m SimpleHTTPServer Serving HTTP on 0.0.0.0 port 8000 ... Now ...
8
votes
2answers
16k views

How can I specify IP and ports for a hostname in the Windows hosts file?

I want to specify host names with two different ports in the Windows hosts file. Is there a way to do it? Or is it not allowed by Windows itself? I have been wasting my time searching for the ...
8
votes
1answer
12k views

How to alias a hostname on Mac OSX

In a nutshell, I would like to be able to open a browser and open local.example.com but it actually loads http://localhost/path/to/example.com/ I am using Mac OSX 10.5, and not afraid to get my hands ...
7
votes
3answers
6k views

Allowing access to localhost outside network

I have a Netbeans project running on localhost with Tomcat and MySQL, all is well. I now want to show my progress to someone in another part of the country. How do I let him access my website ...
7
votes
2answers
5k views

How to connect to localhost from OperaMini

I'm trying to develop a BlackBerry compatible web page (using OperaMini), but OperaMini seems to avoid connecting with localhost: localhost 127.0.0.1 192.168.2.107(ipaddres given by the router) ...
7
votes
2answers
45k views

Can't connect to localhost via browser. Can ping localhost

I'm trying to connect to localhost through my browser to learn some apache tomcat stuff. When I tried to connect to localhost through Firefox, I couldn't; when I tried through IE, I could the first ...
6
votes
5answers
45k views

How to allow remote access to my WAMP server

I have developed a site using WAMP and it's working locally. I want to give access to other users, and when I put the server online and put my IP to the browser it's working. When I put the IP into ...
6
votes
3answers
8k views

How to connect to Google App Engine server in internal network iMac?

I have 3 iMacs and a Windows machine on my home network, all connected via an Airport Extreme router. I'm developing Google App Engine applications locally on one of the iMacs, and can view ...
6
votes
2answers
12k views

How can I capture traffic to localhost using Wireshark?

I am using Wireshark on Windows Vista and I would like to capture http traffic to localhost (127.0.0.1), for debugging purposes, but I have some questions. How can I do this? What capture interface ...
6
votes
1answer
527 views

Is listening on a port on the localhost of a server the same as listening on that port of the server's public IP address?

I set up a free Amazon EC2 instance in order to use a Node app outside of my localhost environment. The instance is allocated a public IP address at launch, mine for example being 54.187.31.42. Does ...
6
votes
3answers
6k views

localhost not working on OS X Yosemite

I have my Mac's local apache server running and when I visit localhost I get the standard "It Works" page. The "It works" page was cached - it is in fact broken the same as 127.0.0.1. When I visit ...
5
votes
2answers
10k views

How to find out what is running on localhost port

I have something running at port 9090 on my local machine. It's probably something I set up long ago and forgot about... how can I find out what it is? I am using Windows 8.
5
votes
2answers
6k views

How to map an IP adress to localhost?

I want to map the IP address 192.168.1.222 to 127.0.0.1 so that if I use 192.168.1.222 in the web browser or ping command I get the response (and that from my 127.0.0.1). Is this possible via ...
5
votes
2answers
2k views

Localhost not recognized in windows 7 machine

I have IIS installed on my windows 7 machine. But when I try to browse the localhost I am getting 404. I tried to put netstat and I see Proto Local Address Foreign Address State ...
5
votes
1answer
101 views

Broswers open localhost instead of remote server

When I try to access my domain http://www.ylog.in , all browsers in my system opens localhost (Where I have Apache2) instead of my remote server hosted at heroku. But when I open the domain via proxy, ...
5
votes
1answer
121 views

I replaced httpd.conf in mountain lion and can no longer connect to localhost

I was trying to allow for my server to use the RewriteEngine in an .htaccess file so I went into /private/etc/apache2 and tried to edit the httpd.conf file, but did not have permission. So I ...
4
votes
1answer
810 views

Chrome slow on request against 127.0.0.1 via “fake” domain (domain.local)

I'm having troubles on my local dev environment with Chrome since an unknown moment in the past, some request (I would say about 90% of them) are really slow, it takes about 10 secs to start ...
4
votes
1answer
2k views

Firefox and Chrome slow on localhost; known fix doesn't work on Windows 7

Firefox and Chrome are known to be slow on localhost when IP6 is enabled. In previous versions of Windows, the simplest fix is to comment out this line from the hosts file, as explained in the answer ...
4
votes
2answers
10k views

Something is using port 80 and I can't figure out what [duplicate]

Possible Duplicate: How to find exe listening on port? What is using port 80? I need to setup a local webserver that I made and bind it to 127.0.0.1:80. However, I can't seem to figure ...
4
votes
4answers
6k views

How to share my localhost over the internet?

I really want to share my localhost over the internet to show my friends the progress of the website we're working on, so that I don't need to upload it to the public server each time I make a change. ...
4
votes
2answers
13k views

Why does my “hosts” file entry have no effect when accessing network shares?

I added the following line to a Windows7 hosts file: 127.0.0.1 mecserver Using ping mecserver works fine, but if I use this name to connect to the notebook (like localhost) to see the Windows ...
4
votes
7answers
8k views

Can't resolve localhost on Mac OS X Server

I have a server running OS X Server 10.5 and it can't resolve localhost to 127.0.0.1. When I try ping this is what happens: > ping localhost ping: cannot resolve localhost: Unknown host SSH and ...
4
votes
1answer
2k views

how do I get 0.0.0.0 to resolve to localhost when browsing a url that contains 0.0.0.0?

Doing some node development on windows. Node programs like to kick out URLs that look like http://0.0.0.0:8080. In Linux (iirc) pasting that url into the browser will be successful. But in Windows, ...
4
votes
1answer
4k views

Kill what ever is running on port 8080

I am trying to run a GAE app on localhost 8080, but it was apparently occupied, even after shutting down and restarting my computer. I ran sudo lsof -i :8080 lo and behold there is something sill ...
4
votes
1answer
6k views

How can I use my iSight camera as an IP camera?

Is there any kind of software that can convert the built-in iSight camera on a Mac OS X into an IP camera and serving it to a localhost? Preferably as static images, but any kind of stream is also ...
3
votes
2answers
5k views

How to access http://localhost on the host operating system if the server is in a virtual machine?

I always used XAMPP for my LAMP environment and developed directly on Windows 7. But now I want to do all my web development on Linux so I installed Ubuntu in virtualbox and installed PHP/MySQL and ...
3
votes
3answers
784 views

I accidentally hijacked my localhost

Opening localhost in the browser is pointing a local webpage (examplePage) after playing with some config files a while back, and I can't figure out how to restore the default behavior. Background: ...
3
votes
3answers
9k views

I have a domain name that I want to redirect to my local server. How do I do this?

This may be better suited for Server Fault, so someone can migrate it if need be. For the purposes of testing, I want to redirect a domain name I own to my localhost. How do I do this? Can I simply ...
3
votes
3answers
2k views

PHP code is returned instead of executed

I have L-Ubuntu 11.04. I've installed Apache2 and I'm trying to simulate a server on my local file system by navigating to localhost in the browser. The problem is that I can't seem to get php to ...
3
votes
1answer
51 views

localhost declaration on PC?

I was wondering , where does windows declares that localhost is - the machine itself (where is it configured?) ? It is not in the hosts file. I thought it is in the Registry but I couldn't find ...
3
votes
8answers
12k views

Safari is unable to reach localhost (127.0.0.1)

I've encountered a really strange Mac problem: Safari is unable to connect to localhost whereas all other applications can connect as normal (Firefox, Chrome, ping, etc.). My /etc/hosts is the ...
3
votes
1answer
794 views

Firewall blocks localhost but only if it's turned on

I run XAMPP server on my Windows XP. If I try to access to http://localhost or http://127.0.0.1 it gives me this error: Could not connect to remote server This only occurs if my Comodo firewall ...
3
votes
1answer
149 views

What would happen if I changed my hostname to 'localhost'?

Would my machine function correctly? Would other machines on the network be able to ping mine by name?
3
votes
1answer
11k views

Connect to localhost from another computer

I'm trying to access a database that is hosted in a Mac localhost from my Android device which are both connected to the same network. The localhost project is running at www.localhost:8000/ I've ...
3
votes
1answer
2k views

Ubuntu localhost: Not found

I have updated my Ubuntu 13.10 to 14.04, so I have a newer version now. But I spotted that after the update I experience a 404 error while trying to access my http://localhost/ After a complete ...
3
votes
1answer
839 views

WAMP not working anymore

I had been successfully using WAMP on my PC for a year or so but after I got internet connection through LAN, I noticed that WAMP has stopped working. When I go to http://localhost or http://127.0.0.1 ...
3
votes
1answer
4k views

How Do I Access localHost From VMware when even the computer isn't accessible from the network [closed]

There are several threads regarding accessing host's localhost from a guest OS. None attracts my specific problem, therefor IMHO this question isn't a duplication. I did follow all the steps appear ...
3
votes
0answers
222 views

read localhost mail and send to locahost using Mail.app (or any other std mail client app)

I want to read the localhost mail on Mail.app. Currently I just type mail on the command line. If I can read "localhost" mail on my Mail.app, then can I send (or move mail from other accounts, e.g. ...
3
votes
0answers
103 views

How can I send emails from my app “locally”? [closed]

I have an app that sends emails and I want to test it under high volumes of traffic (not because it needs to send high volumes of emails - because I'm debugging a problem that occurs rarely and is ...