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
1288
votes
28 answers

How do I remove the process currently using a port on localhost in Windows?

How can I remove the current process/application which is already assigned to a port? For example: localhost:8080
KavinduWije
  • 39,451
  • 4
  • 14
  • 17
851
votes
22 answers

Addressing localhost from a VirtualBox virtual machine

I have a local test/development server (HTTP, of course), listening to port 8000. I'm working on Linux, so to test the page on Internet Explorer 6, 7, 8, etc. I run a virtual machine using VirtualBox; I also need to see how it look on Firefox in a…
hasen
  • 161,647
  • 65
  • 194
  • 231
596
votes
18 answers

How to connect to my http://localhost web server from Android Emulator

What can I do in the Android emulator to connect it to my localhost web server page at http://localhost or http://127.0.0.1? I've tried it, but the emulator still takes my request like a Google search for localhost or worse it says that it didn't…
547
votes
35 answers

Google Chrome redirecting localhost to https

When I debug a Visual Studio project using Chrome the browser tries to redirect to the https equivalent of my web address. I do not have SSL enabled in the web project and the start URL is the http URL. When I debug using FireFox or IE I do not…
Brett Mathe
  • 6,429
  • 7
  • 23
  • 24
415
votes
25 answers

Using reCAPTCHA on localhost

I'm developing a website using PHP and I want to make a human verification in one of the sessions. For the development, I'm initially running the system locally and when it is ready, I'm going to put it on some domain. In the reCAPTCHA website it is…
rlc
  • 5,809
  • 5
  • 38
  • 46
386
votes
15 answers

No “Proceed Anyway” option on NET::ERR_CERT_INVALID in Chrome on MacOS

I try to get my local development in Chrome back running, but Chrome prevents that, with the message that the certificate is invalid. Even though it could not be the date of the certificate, as you can see in the screenshot of it: I just wonder why…
DarioSoller
  • 3,909
  • 3
  • 12
  • 6
373
votes
7 answers

How do you connect localhost in the Android emulator?

I have made a php script inside localhost and I am connecting that with httpClient but I am getting a problem. Please tell me how can I connect to a php file at localhost from the emulator?
Dharmendra
  • 33,296
  • 22
  • 86
  • 129
370
votes
28 answers

How do you access a website running on localhost from iPhone browser

I am working on a mobile website and would like to test it using my iPhone browser. My Windows 7 machine and iPhone are on the same wireless network. How do I access localhost from the iPhone? Right now I get a 404 error.
rams
  • 6,381
  • 8
  • 46
  • 65
354
votes
7 answers

Invalid Host Header when ngrok tries to connect to React dev server

I'm trying to test my React application on a mobile device. I'm using ngrok to make my local server available to other devices and have gotten this working with a variety of other applications. However, when I try to connect ngrok to the React dev…
Patrick Connors
  • 5,677
  • 6
  • 27
  • 54
318
votes
26 answers

Accessing localhost:port from Android emulator

I'm running a web service on my local machine that runs at localhost:54722. I want to call the service from an app running in the Android emulator. I read that using 10.0.2.2 in the app would access localhost, but it doesn't seem to work with the…
Robin
  • 3,533
  • 4
  • 18
  • 8
318
votes
12 answers

Can you test google analytics on a localhost address?

I have to test out my new GA account on my local machine. Will this work just by copying the standard snippet supplied by Google onto the page ? I don't want to spend 24 hours waiting to see if it will or won't work.
edwardmlyte
  • 15,937
  • 23
  • 58
  • 83
293
votes
8 answers

Run command on the Ansible host

Is it possible to run commands on the Ansible controller node? My scenario is that I want to take a checkout from a git server that is hosted internally (and isn't accessible outside the company firewall). Then I want to upload the checkout…
Ross
  • 46,186
  • 39
  • 120
  • 173
255
votes
15 answers

Set cookies for cross origin requests

How to share cookies cross origin? More specifically, how to use the Set-Cookie header in combination with the header Access-Control-Allow-Origin? Here's an explanation of my situation: I am attempting to set a cookie for an API that is running on…
Pim van der Heijden
  • 6,956
  • 4
  • 16
  • 21
228
votes
14 answers

OAuth: how to test with local URLs?

I am trying to test OAuth buttons, but they all (Facebook, Twitter, LinkedIn) come back with errors that seem to signal that I can not test or use them from a local URL. How do people usually work in development with OAuth stuff if they all seem to…
Awesomeness
  • 2,501
  • 3
  • 18
  • 18
220
votes
5 answers

What is the difference between 127.0.0.1 and localhost

Assuming the following is defined in .../hosts: 127.0.0.1 localhost What, if any, are the actual differences between using 127.0.0.1 and localhost as the server name, especially when hitting processes running locally that are listening for…
Bohemian
  • 412,405
  • 93
  • 575
  • 722
1
2 3
99 100