Questions tagged [localhost]

In computer networking, localhost is the hostname given to the address of the loopback network interface. It is used by a host to access network services running on itself.

In computer networking, localhost is the hostname given to the address of the loopback network interface. It is used by a host to access network services running on itself.

On many operating systems, localhost translates to an IPv4 address 127.0.0.1 and IPv6 address ::1. However this may be configured differently.

Technically, tested on Windows and IPv4 address starts with 127 will be regarded as and it should access the same result as localhost. However, the same result, may depend upon the local server settings that you aim to connect with. For example, restricting access from specific IP such as 127.0.0.1. Knowing this note helps in local testing that need another host IP. For example, in web design, suppose that you want to view new favicon of your website hosted locally, simply, instead of accessing it http://localhost or http://127.0.0.1 (or http://[::1]) you can access it something like http://127.10.205.98

Useful links

10147 questions
139
votes
27 answers

WAMP/XAMPP is responding very slow over localhost

I don't know what the problem is. WAMP was very slow, so I reformatted my computer and installed WAMP. Still, accessing localhost is very, very slow, and sometimes it doesn't even load at all. I even removed it and replaced it with XAMPP, but I…
FBwall
  • 1,543
  • 3
  • 13
  • 15
124
votes
8 answers

Jvm takes a long time to resolve ip-address for localhost

I seem to have a problem with performance of "sbt test" (which includes looking up localhost names/IP addresses) after upgrading to macOS Sierra. On a previous version of OS X it took about 40-50 seconds to finish. macOS Sierra times are much higher…
Tomasz Mikus
  • 1,286
  • 2
  • 9
  • 8
121
votes
1 answer

tcpdump: localhost to localhost

I write a program that send TCP packets from localhost to localhost. And I want to use tcpdump to capture the packets. But nothing is captured. My command in Ubuntu: sudo tcpdump What argument shall I add? Thanks!
David
  • 1,235
  • 2
  • 8
  • 7
121
votes
11 answers

How can I detect if the user is on localhost in PHP?

In other words, how can I tell if the person using my web application is on the server it resides on? If I remember correctly, PHPMyAdmin does something like this for security reasons.
Richie Marquez
  • 2,228
  • 3
  • 19
  • 18
117
votes
14 answers

Connect Device to Mac localhost Server?

How do I allow any device, e.g., iPhone, to connect over a WLAN to my Mac's localhost server? On my Mac, I'm running a "Hello World" HTTP Node.js server that serves a page, which Safari opens successfully, at http://localhost:1337. And, running…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
116
votes
16 answers

How to configure Fiddler to listen to localhost?

I want to monitor HTTP traffic between a process on my local machine and another (server) process, also running on my local machine. How can I configure Fiddler to listen to traffic to and from localhost?
The Light
  • 26,341
  • 62
  • 176
  • 258
114
votes
11 answers

React-router v4 - cannot GET *url*

I started to use react-router v4. I have a simple in my app.js with some navigation links (see code below). If I navigate to localhost/vocabulary, router redirects me to the right page. However, when I press reload (F5) afterwards…
exoslav
  • 2,094
  • 3
  • 21
  • 26
114
votes
23 answers

How to solve ERR_CONNECTION_REFUSED when trying to connect to localhost running IISExpress - Error 502 (Cannot debug from Visual Studio)?

This is running on Windows Server 2008 and used to work several months ago. I am just now using this server again for some dev work with VS. This is live web server used to serve up a few test sites as well. This came up when running Visual Studio,…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
112
votes
12 answers

How to run html file on localhost?

I have an HTML file and I run it on localhost. But, this file includes a mirror using a webcam. For example, how can I run this HTML file on localhost? Webcam starts in this example when checking to live checkbox.
Volkan Şahin
  • 1,181
  • 2
  • 10
  • 15
110
votes
10 answers

how to test open graph on localhost

I've done a lot of research and haven't found a definitive answer to this. Is there anyway to test the open graph on localhost? I don't haven any issues using the graph api on locahost. I've changed my website url in the app settings and have even…
DavidB
  • 2,064
  • 3
  • 17
  • 17
110
votes
14 answers

How can I eliminate slow resolving/loading of localhost/virtualhost (a 2-3 second lag) on Mac OS X Lion?

Since setting up my development environments on Mac OS X Lion (brand new macbook air purchased in January 2012), I have noticed that resolving to a virtual host is very slow (around 3 seconds) the first time but after that is fast as long as I…
Adam Gries
  • 1,751
  • 3
  • 14
  • 12
104
votes
10 answers

What's the whole point of "localhost", hosts and ports at all?

I'm totally new to this web development stuff. So I see things like "localhost" all the time and ask myself: What's that? I feel to know what a "host" actually is. Something that executes something. So my mac is the host for everything that runs on…
openfrog
  • 40,201
  • 65
  • 225
  • 373
99
votes
3 answers

How do you use https / SSL on localhost?

I would like to know how to setup SSL on my web application on the localhost. I have no background in doing this, would appreaciate guidance. I already finished implementing my web application and i need it to use https on the localhost or while I…
HShbib
  • 1,811
  • 3
  • 25
  • 47
97
votes
7 answers

`Apache` `localhost/~username/` not working

So I just recently upgrade to Mac OS X Yosemite and I need to set up my Apache again. I create a folder "Sites" under /user/kevin and change file permission to 777 and uncomment the php5module line in /etc/apache2/httpd.conf just like…
CocoHot
  • 1,211
  • 2
  • 11
  • 18
94
votes
13 answers

How to find FQDN of local machine in C#/.NET ?

How can you get the FQDN of a local machine in C#?
Gabe