`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

98
votes
4answers
13k views

What's the difference between 127.0.0.1 and 0.0.0.0?

I understand that 127.0.0.1 points to localhost, and so does 0.0.0.0 (correct me if I'm wrong). So, what's the difference between 127.0.0.1 and 0.0.0.0?
65
votes
6answers
29k 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?
41
votes
2answers
21k 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
36k 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 ...
26
votes
3answers
8k 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 ...
18
votes
3answers
9k 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
3answers
25k 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 ...
15
votes
1answer
8k 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 ...
12
votes
5answers
9k 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 ...
11
votes
5answers
13k 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 ...
11
votes
6answers
36k 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 ...
10
votes
6answers
2k views

The easiest way to serve a page to localhost on OS X

I have a page that I need to serve on localhost for the fonts to appear properly. What is the easiest way to do this (on a Mac)?
10
votes
2answers
3k 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 ...
9
votes
3answers
2k 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
15k 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 ...
9
votes
2answers
23k 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
2answers
24k 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.
8
votes
3answers
13k 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 ...
8
votes
3answers
5k views

ERR_ICANN_NAME_COLLISION when trying to use localhost .dev in Chrome

Today I got this error when trying to access local domains specified in apache httpd-vhosts.conf. It happened for the 1st time with a .dev domain, so it seemed plausible that in light of recent news ...
7
votes
3answers
9k 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 ...
7
votes
2answers
9k 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 ...
7
votes
3answers
8k 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
55k 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 Internet Explorer, I ...
6
votes
5answers
58k 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
2answers
13k 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
903 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 ...
5
votes
2answers
8k 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 ...
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
7answers
9k 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 ...
5
votes
1answer
118 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
125 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
2answers
5k views

Redirect Domain Name to Localhost

I have a linux test machine which I would like to run a copy of a production webserver. This is a legacy application which does not use a property file for its server name. Throughout the application, ...
4
votes
1answer
855 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
16k 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
2answers
13k 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
7k 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
3answers
17k 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 ...
4
votes
8answers
14k 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 ...
4
votes
3answers
3k views

Browsing to localhost is slow when connected to Internet

When I browse localhost in my browser when connected to the Internet, the response is slow; it takes 30 seconds or completely times out. When I disconnect from the Internet, it is blazing fast and ...
4
votes
1answer
2k views

How can I get Apache 2.4 localhost subdirectories to resolve when root resolves perfectly?

Based on other answers here I was able to get Apache to load localhost pages: 2.2 configuration: Order allow,deny Allow from all 2.4 configuration: Require all granted This works great for ...
4
votes
1answer
3k 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
7k 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 ...
4
votes
0answers
237 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
4answers
14k views

Why I can't visit http://localhost via IE?

But it's fine when I'm using firefox, and in IE I can also open the page via 127.0.0.1 Anyone knows how to fix it for IE?
3
votes
2answers
4k views

Deny access to a port from localhost on OSX

I want to test a fallback strategy for my memcached driver (in case port is protected by firewall). How can I deny access to a specific port, on 127.0.0.1?
3
votes
2answers
6k 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
983 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
4k 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 ...