Questions tagged [localhost]

Localhost is an address/term used for testing connection to the local host (current computer) used for some network troubleshooting

localhost (all lowercase) (meaning this computer in computer networking) and is the standard hostname given to the loopback network interface.

IPv4

Under IPv4 the standard localhost address is normally assigned to:

127.0.0.1

IPv6

In full notation, the address under IPv6 is:

0:0:0:0:0:0:0:1
537 questions
258
votes
4 answers

Why does my hostname appear with the address 127.0.1.1 rather than 127.0.0.1 in /etc/hosts?

This may be a bit of a noobish question, but I was taking a look at /etc/hosts on my new Xubuntu install and saw this: 127.0.0.1 localhost 127.0.1.1 myhostname On most 'nixes I've used, the second line is omitted, and if I want to add my hostname…
Tom
  • 3,133
  • 2
  • 19
  • 19
215
votes
15 answers

In my /etc/hosts/ file on Linux/OSX, how do I do a wildcard subdomain?

I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com to my /etc/hosts/ file? If it's not possible, how do I work around this problem? I need to test wildcard sub-domains on my localserver. …
MikeN
  • 8,252
  • 5
  • 22
  • 18
66
votes
7 answers

How to force MySQL to connect by TCP instead of a Unix socket?

I would like to analyze mysql traffic. Right now, all mysql requests are sent to the MySQL unix socket: unix 2 [ ACC ] STREAM LISTENING 3734388 15304/mysqld /var/run/mysqld/mysqld.sock I'm trying to disable that socket to…
Max
  • 3,373
  • 15
  • 51
  • 71
27
votes
11 answers

MySQL cannot connect via "localhost", only 127.0.0.1

this is somewhat of a mystery to me. The only way I can connect to MySQL is if I call it via "127.0.0.1" ... for example, my PHP connect script will NOT work with localhost I'm running Mac OS X Lion, built-in apache2, MySQL, PHP,…
dcolumbus
  • 465
  • 1
  • 5
  • 10
26
votes
1 answer

How to configure Tomcat to only listen to 127.0.0.1?

The environment is Ubuntu 10.04.1 LTS running Tomcat 6 and Apache 2.2 from the repos. Apache is configured to proxy requests to Tomcat, so I really want to turn off Tomcat listening to requests on external IP addresses. I found out how to change the…
Jacob
  • 781
  • 1
  • 6
  • 10
21
votes
2 answers

Who picked 127.0.0.1 to be localhost and why? What meaning does it have?

I'm almost positive everyone on here knows the meaning of 127.0.0.1. But, why is that ALWAYS localhost? Who picked that arbitrary IP? Why was that IP picked? Why not something more simple such as 1.0.0.0? Is there some special meaning to 127.0.0.1?
James Graham
  • 329
  • 2
  • 6
20
votes
12 answers

FTP hangs on: 150 Opening ASCII mode data connection

I am setting up an FTP server on my Windows 2008 server (R2). Everything appears to be installed correctly but I am having trouble using an FTP Client to login to my FTP server. I can remote desktop on to the server and through DOS commands I can…
D3vtr0n
  • 387
  • 3
  • 5
  • 15
19
votes
3 answers

localhost in a DNS zone

Our ISP also hosts our external DNS. By default they include an entry for localhost. For example: localhost.example.com. 86400 IN A 127.0.0.1 When I've asked them to remove it they give me a hard time and say that it's just the way Bind works. I've…
matthew
  • 1,309
  • 1
  • 11
  • 21
18
votes
5 answers

Is there a way to get wireshark to capture packets sent from/to localhost on Windows?

Is there a way to get wireshark to capture packets sent from/to localhost? When I monitor traffic going from my computer to another, or from another computer to my computer, then it works. But from localhost to localhost does not register…
Brian R. Bondy
  • 743
  • 2
  • 10
  • 16
16
votes
1 answer

Failed to connect to 127.0.0.1 port 80

I have running nginx server (doesn't matter which server): $ sudo netstat -tulpn | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4268/nginx tcp6 0 0 :::80 :::* LISTEN 4268/nginx And…
Al Che
  • 161
  • 1
  • 1
  • 5
13
votes
8 answers

Can't SSH into a Vagrant Virtual Machine

Local Vagrant machine installed at IP address 10.0.0.23 with hostname lamp-vm. Using vagrant ssh command, I can connect just fine and do everything I need. This creates an error $ ssh vagrant@lamp-vm -v -v debug1: connect to address 10.0.0.23…
csi
  • 1,535
  • 7
  • 22
  • 42
12
votes
1 answer

"/etc/apache2/httpd.conf: No such file or directory" error after Ubuntu upgrade

So I upgraded Ubuntu and I went to 127.0.0.1 in Chrome and got "Oops! Google Chrome could not connect to 127.0.0.1" so I restarted Apache but was met with this error: apache2: Syntax error on line 215 of /etc/apache2/apache2.conf: Could not open…
noidea
  • 123
  • 1
  • 1
  • 4
12
votes
4 answers

can localhost be spoofed?

Is it possible for a remote machine to access another machine's localhost data by spoofing the loopback ip? Say if I wanted a setup where if I'm connecting from somewhere outside my own network, I will have to supply login credentials and my…
bee.catt
  • 225
  • 1
  • 2
  • 7
12
votes
1 answer

What is the 'cacert.pem' and for what to use that?

I am developing a web application on localhost with domains and sub-domains and I would like to use a HTTPS connection. On my Mac OS, in order to enable SSL, I need to set Apache correctly, so I followed some guide to accomplish part of that. Now it…
user65567
  • 651
  • 2
  • 6
  • 9
11
votes
4 answers

What exactly is going on when I go to localhost:8080 in my web browser? (Apache Tomcat)

I've spent my career doing all local application programming (C++ applications and whatnot). I'm trying to dig my feet into the web world now, however. I'm using Eclipse (Mars) and Apache Tomcat 8.0.23 to try and set up an envoirnment in which I…
softeng
  • 113
  • 1
  • 1
  • 4
1
2 3
35 36