Skip to main content

Questions tagged [localhost]

`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.

Filter by
Sorted by
Tagged with
348 votes
5 answers
192k 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?
Sagnik Sarkar's user avatar
96 votes
6 answers
78k 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?
Roee Adler's user avatar
  • 1,588
70 votes
2 answers
173k views

Why is my localhost not 127.0.0.1 but ::1, and what notation is that? [duplicate]

When I use the Ping command against my localhost (on Windows Vista), 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: ...
Samir's user avatar
  • 20.9k
54 votes
4 answers
116k views

How to kill a localhost:8080

I'm trying to kill a dev server setup via yarn on Windows. While I Ctrl+C'd the command prompt, when I went back to localhost:8080 it had not stopped. How can I kill the process?
Sam Fuller's user avatar
49 votes
2 answers
96k views

How can I use curl with ::1 for ipv6 based loopback?

I tried a few ways but they seem to be confusing curl. root@testt:~# curl localhost:8080 <h1>Hello world!</h1> <p>Boom Bam Splat</p> root@testt:~# curl ::1:8080 curl: (3) ...
hak8or's user avatar
  • 722
48 votes
3 answers
285k 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.
BanksySan's user avatar
  • 733
39 votes
1 answer
87k 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 ...
Austin Hyde's user avatar
  • 1,094
38 votes
6 answers
135k 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 the same ...
Diogo's user avatar
  • 30.5k
37 votes
3 answers
14k views

Why does the registered domain name “localtest.me” resolve to 127.0.0.1?

I was reading an article about Server-Side Request Forgery. In that article the attacker found that 127.0.0.1 was open to the internet. The victim then blocked 127.0.0.1, but because many other IPs ...
not2qubit's user avatar
  • 2,365
37 votes
3 answers
203k 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 ...
user avatar
37 votes
5 answers
68k 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 ...
konrad's user avatar
  • 475
36 votes
7 answers
75k 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)?
Zachary Russell Heineman's user avatar
30 votes
3 answers
27k 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 I ...
Nick Retallack's user avatar
29 votes
3 answers
159k 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 ...
starscape's user avatar
  • 403
28 votes
8 answers
28k 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 ...
danjah's user avatar
  • 435
27 votes
4 answers
44k 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 ...
mawcsco's user avatar
  • 943
26 votes
7 answers
70k views

How to connect wsl to a windows localhost?

I'm trying to let WSL use a localhost proxy(actually its Fiddler) on my windows, but I can't see any connection like that, and downloads usually fail, how do I fix that? I know that I can connect to ...
ygy's user avatar
  • 381
25 votes
4 answers
7k views

Why does the “Internet of Things” enforce the need for IPv6 addresses?

If you have multiple devices in one network, the amount of IPv4 addresses will not increase linearly to accomodate the number of devices. There is just one IPv4 address per Network/Router that is ...
codepleb's user avatar
  • 1,295
25 votes
3 answers
34k views

How do I ping localhost using IPv6?

I'm trying to understand IPv6 better. Firstly, I try ifconfig, and I get the following: eth0 Link encap:Ethernet HWaddr XXXXXXX inet addr:X.X.X.X Bcast:X.X.X.X Mask:XXXXXXXXX ...
nafas's user avatar
  • 519
25 votes
3 answers
80k 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 ...
Sebastian's user avatar
  • 373
24 votes
2 answers
44k views

Windows 10 WSL cURL can't access localhost with error (Failed to connect to localhost port 80: Connection refused)

The issue with my WSL is the following my WSL can't make a cURL request anywhere under localhost. For this example, I have created a page that returns hello world. My cURL looks like this (note that ...
Theodosis 's user avatar
23 votes
2 answers
17k 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 ...
Carter Pape's user avatar
23 votes
1 answer
40k 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, ...
somebody's user avatar
  • 231
23 votes
4 answers
63k 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 ...
tanathos's user avatar
  • 333
22 votes
6 answers
152k 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 ...
Ofer Mehulal's user avatar
21 votes
4 answers
25k views

How to avoid google chrome proxy bypass for localhost?

On Linux I'm starting chrome as google-chrome --proxy-server=127.0.0.1:8888 --proxy-bypass-list="" however it's still not using the proxy for localhost requests. How can I force chrome to use my ...
Filipe Giusti's user avatar
18 votes
5 answers
23k 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 ...
avirk's user avatar
  • 15.8k
18 votes
6 answers
127k views

How to change default browser to open localhost in wampserver

When I installed wampserver on my computer. I didn't have firefox or any browser installed. Because I also disabled Internet explorer. How do I manually set the default browser that opens up localhost ...
soul's user avatar
  • 3,659
18 votes
2 answers
21k 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 ...
Deniz Dogan's user avatar
17 votes
6 answers
134k 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 ...
EasilyBaffled's user avatar
17 votes
8 answers
78k 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 &...
Canesin's user avatar
  • 309
16 votes
2 answers
33k 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, it'...
jcollum's user avatar
  • 5,183
13 votes
2 answers
27k 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 shares ...
hitzi's user avatar
  • 241
12 votes
2 answers
22k views

Cannot communicate with Windows localhost from WSL2

I have an application running on Windows on localhost (127.0.0.1) port 8545. My goal is to be able to communicate with this application from within WSL2. However, whenever I try to access the address ...
Petahanks's user avatar
  • 121
12 votes
8 answers
53k 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 ...
knorv's user avatar
  • 3,512
11 votes
3 answers
26k 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 127....
harryg's user avatar
  • 391
11 votes
10 answers
36k 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 web ...
iainbeeston's user avatar
11 votes
2 answers
176k 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 ...
Sceptre's user avatar
  • 111
10 votes
2 answers
107k views

Can't access localhost from computer running on same network

I'm working on two computers on the same network. Computer A has an app working on localhost:4444. However, I can't access it from the browser of Computer B. Here is my situation: I pinged it's IP ...
gespinha's user avatar
  • 235
10 votes
3 answers
10k views

localhost in sudoers

There is no chance of an internal attack, so I would like to give sudo privileges to users at the local computer using sudoers. I tried these lines separately: %admin localhost=(ALL) NOPASSWD: ALL %...
Zaz's user avatar
  • 2,586
10 votes
3 answers
10k views

Why is there more than one loopback IP address?

Most applications only need the one loopback IP address of 127.0.0.1. However, not only is the address block 127.0.0.1/32 provided, and even 127.0.0.0/24 is provided as well but in fact the whole ...
Ms. Molly Stewart-Gallus's user avatar
9 votes
3 answers
3k 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 127....
tony_sid's user avatar
  • 14.5k
9 votes
1 answer
7k views

Google chrome is slow on refreshing localhost website

I have a local website running on nodejs simple server made by gulp-connect plugin. When i refresh that local address, in Internet Explorer 11 it takes only 2s but in chrome it's versy slow. usually ...
Morteza's user avatar
  • 321
9 votes
2 answers
72k 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 ...
jamen's user avatar
  • 205
9 votes
2 answers
66k views

Chrome Localhost Connection Refused

This question is not a duplicate because the suggested duplicate does not solve this problem. There is no such flag on chrome://flags/. I'm using the Google Chrome web browser and WampServer to ...
BullyWiiPlaza's user avatar
8 votes
5 answers
43k 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?
user11671's user avatar
  • 567
8 votes
2 answers
27k views

vncserver -localhost and ssh tunneling

I'm trying to setup a ssh tunneled vnc connection from my centos 5.10 machine and I've been following some online tutorials such as this one: https://wiki.archlinux.org/index.php/Vncserver. I'm ...
shwoseph's user avatar
  • 369
8 votes
3 answers
13k 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 ...
user avatar
8 votes
4 answers
46k 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 ...
Meke's user avatar
  • 183
8 votes
1 answer
11k views

Is 'localhost' considered fully qualified?

In the absence of a domain name, is the name localhost considered fully qualified? Or is localhost always considered unqualified? $ hostname --fqdn debian-q500 $ ping debian-q500 PING debian-q500 (...
jww's user avatar
  • 12.2k

1
2 3 4 5
14