Questions tagged [localhost]

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

Filter by
Sorted by
Tagged with
267 votes
5 answers
207k views

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 ...
Tom's user avatar
  • 3,223
231 votes
19 answers
289k views

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 ...
MikeN's user avatar
  • 8,482
70 votes
7 answers
136k views

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/...
Max's user avatar
  • 3,553
28 votes
11 answers
104k views

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, ...
dcolumbus's user avatar
  • 475
27 votes
1 answer
50k views

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 ...
Jacob's user avatar
  • 811
22 votes
12 answers
156k views

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 ...
D3vtr0n's user avatar
  • 407
21 votes
2 answers
4k views

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....
James Graham's user avatar
19 votes
5 answers
40k views

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 ...
Brian R. Bondy's user avatar
19 votes
3 answers
36k views

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 ...
matthew's user avatar
  • 1,319
18 votes
2 answers
58k views

How to add local forward setting to my ssh config file?

I currently can do this: ssh 12.34.56.78 -L 8888:localhost:8000 And I can then open my local browser to localhost:8888 and see the app running in my server at 12.34.56.78:8000. I want to avoid having ...
andrux's user avatar
  • 285
16 votes
1 answer
104k views

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 ...
Al Che's user avatar
  • 161
13 votes
8 answers
58k views

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@...
csi's user avatar
  • 1,565
13 votes
4 answers
15k views

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 ...
bee.catt's user avatar
  • 235
12 votes
1 answer
54k views

"/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 ...
noidea's user avatar
  • 123
12 votes
1 answer
30k views

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 ...
user65567's user avatar
  • 671
11 votes
3 answers
14k views

Assigning Multiple IP Addresses to localhost OS X 10.6

I'm attempting to host multiple website locally with HTTPS enabled, but in order to do this I'd need to configure my local machine to use multiple IP address for localhost (I believe). Is there any ...
user1086746's user avatar
11 votes
4 answers
91k views

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....
softeng's user avatar
  • 113
10 votes
5 answers
18k views

/etc/hosts file being ignored

My hosts file is being ignored, apparently. It contains: 127.0.0.1 localhost.localdomain localhost 127.0.0.1 mydomain.com 127.0.0.1 nowhere If I ping localhost or 'nowhere', I get an 'unknown ...
Rdbhost's user avatar
  • 323
10 votes
4 answers
14k views

iptables: what does "--src-type LOCAL" mean exactly?

The iptables man page defines it as "a local address" but does this refer only to the 127 range (localhost) or does it include 10, 169, 192 as well ?
bobby's user avatar
  • 459
9 votes
4 answers
370k views

How to access localhost by IP address? [closed]

I am trying to access localhost by my IP address. My IP address is/was 217.164.79.62 (It is set to be automatically assigned so it keeps changing). When I visit http://localhost/, I get the XAMPP ...
Malte Werschy's user avatar
9 votes
3 answers
3k views

DNS Lookups for local MAMP web server URL taking 5+ seconds

I'm running MAMP on OS X 10.7. I've set up a virtual host in Apache, like so: <Directory "/sites/example.com/"> Allow From All AllowOverride All </Directory> <VirtualHost *:80> ...
Ian's user avatar
  • 1,498
9 votes
3 answers
11k views

Windows Server 2008 - Connecting to 127.0.0.1

Im running Windows Server 2008 R2, we have an application that connects from (binds to) a public IP on the server to 127.0.0.1:8334 [connects to a service listening on 0.0.0.0:8334] In Windows 2003, ...
user avatar
8 votes
3 answers
41k views

nginx redirecting to localhost

I'm sort of a noob at this and I'm just switching into nginx so I apologize for the noob question. I have installed nginx and when I go to the root directory of its web folder I can get the index ...
user avatar
8 votes
2 answers
32k views

How to create an alias for a named SQL Server instance

On my developer computer I have an SQL Server instance named developer_2005. In the resource setting files of a C# application we are creating, the instance name is set to foobar (not really, but just ...
Svish's user avatar
  • 7,117
7 votes
3 answers
11k views

Is it safe to add additional 127.0.0.1 entries to /etc/hosts?

I want to add this entry: 127.0.0.1 api.localhost To test the api of my web app. However, the hosts file says: ## # Host Database # # localhost is used to configure the loopback interface # ...
user avatar
7 votes
6 answers
40k views

SSH login using public key failed

On localhost running sshd service. Created two pairs of rsa keys for root and user1 using ssh-keygen. Copied from root/.ssh/id_rsa.pub to user1/.ssh/id_rsa.pub. Changed permissions to 600. Tried ssh -...
J.Olufsen's user avatar
  • 303
7 votes
3 answers
53k views

Curl request wont resolve to localhost

I have an ubuntu server running apache on localhost / port 80. It's domain is sub.domain.com If I make a curl request to http://localhost on that machine it will error with 'couldnt connect to host' ...
Ashley Smith's user avatar
7 votes
3 answers
22k views

IIS asks for login/pass when accessed using hostname but not when 'localhost' is used. Why?

I have setup IIS on my xp machine and have setup a default homepage (that comes with the IIS installed). It is a help page I think. when I access the page with http://localhost it works fine (IE/...
sb.'s user avatar
  • 73
6 votes
2 answers
11k views

Configure Dovecot to only let localhost connect via imap

How do I configure the Dovecot message delivery agent to only allow imap connections from localhost?
linus1412's user avatar
  • 355
6 votes
5 answers
27k views

Accessing localhost on IIS7 from another computer on the network

I recently upgraded computers to Windows 7 Professional and am running IIS7. When I'm on my computer I can easily access localhost through my web browser but when I try from another computer on my ...
Adam's user avatar
  • 175
6 votes
2 answers
18k views

Sendmail to local domain ignoring MX records (part 2)

I have the exact problem, like in this post: Sendmail to local domain ignoring MX records . I am also using an email provider like GMail For Your Domain (which stores your mail and manages it). I am ...
Vladislav Rastrusny's user avatar
6 votes
1 answer
40k views

Port 80: connection refused. How to fix on Mac OSX? [duplicate]

I've noticed some issues with Apache virtual hosts on two Macs that otherwise have the same kind of set up (in terms of httpd.conf, vhosts, hosts etc.) On one Mac, virtual hosts are served without a ...
Tench's user avatar
  • 361
6 votes
3 answers
4k views

Can I access Cassini from a remote machine?

So I'm having that browser compatibility party we all have at some point in a web project and want to access my localhost Cassini instance created by VS2008 rather than having to upload to our ...
Denis Hoctor's user avatar
5 votes
4 answers
39k views

Why does local host say "It Works"? [closed]

I have configured all my websites in the "Sites" folder to be tested in my browser. When I type a web address for example http://test.dev, I get "It Works". Why?
david's user avatar
  • 83
5 votes
4 answers
7k views

Virtual hosts on same ip AND port

Is this even possible? My current vhost.conf entries: <VirtualHost www2.b-page.lv:80> ServerAdmin [email protected] DocumentRoot "C:/xampp/htdocs/b-page" ServerName b-page ...
Kristaps Karlsons's user avatar
5 votes
3 answers
3k views

iptables for local connections

On "Server A", I have a service running on port 1445. "Server B" can connect to "Server A" on port 445 via the following rule: iptables -t nat -A PREROUTING -d www.kunde.de -p tcp -m tcp --dport 445 -...
user27451's user avatar
  • 1,161
5 votes
2 answers
6k views

Difference between 127.0.0.1 and 127.0.1.1? [duplicate]

In my /etc/hosts file, I have two lines: 127.0.0.1 localhost 127.0.1.1 hostname What is the difference between the two lines, where do I find the host name?
user482004's user avatar
5 votes
1 answer
64k views

DNS server can't resolve localhost name

I'm trying to set up an Apache server on my RHEL6.4 vm and can't because dnsmasq can't recognize the hostname for some reason: nslookup rhel64.example.com Server: xxx.xxx.xx.1 Address: ...
pt18cher's user avatar
  • 153
5 votes
3 answers
19k views

Ubuntu + Nginx 127.0.0.1 works but localhost doesn't

this one is weird, because I don't have any error messages. I have a very basic default file: server { #listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 ...
valk's user avatar
  • 507
5 votes
1 answer
3k views

Self-signed EV SSL certificate [closed]

I have a ton of testing projects going on in my localhost apache server. I have SSL installed on my localhost. Call me a freak (and I wouldn't mind it because this is totally pointless), but I would ...
Coach0512's user avatar
5 votes
2 answers
4k views

Alternative to HOSTS file for virtual hosts?

I am running Windows 7, Apache 2.28 is my version of Apache, localhost and virtual hosts run well. Only one issue - what's the best alternative to using the HOSTS file? I tried DNSKong, but not sure ...
akburn86's user avatar
5 votes
2 answers
2k views

How to reset and persist the hostname and FQDN of an Windows Azure Centos instance?

How does one reset a hostname and domain name (FQDN) to localhost.localdomain on a Centos 6.2 Azure Instance? I've tried editing /etc/sysconfig/network, /etc/sysctl.conf, setting the hostname manually,...
ddario's user avatar
  • 511
4 votes
3 answers
24k views

IIS refuses connection to localhost and 127.0.0.1

I am unable to connect to localhost and http:// 127.0.0.1 on one of my machines. However http://machinename works. This results in the Windows Token Application being not able to issue tokens, ...
Marco's user avatar
  • 158
4 votes
1 answer
1k views

Downloading from wget - folder issue

I have a website - http://myradio1.localhost and the directory is currently empty. The virtual host works fine, no issues there. This is my command I'm using to download the site via wget: wget --...
avenas8808's user avatar
4 votes
2 answers
31k views

How do I fix "getaddrinfo: localhost Name or service not found" for telnet server?

I need to enable telnet (no i can't use ssh, and I don't want to discuss why I have to use telnet either), I have 127.0.0.1 localhost.localdomain localhost in /etc/hosts. I have installed telnet-...
Nick Anderson's user avatar
4 votes
1 answer
4k views

Cannot loopback to localhost php gateway causing nginx to timeout while setting up firewall with ufw

I'm setting up ufw for the first time. Using Ubuntu 10.04 LTS on an OpenVZ VPN and have the following rules: sudo ufw allow 22/tcp sudo ufw allow 25/tcp sudo ufw allow 53 sudo ufw allow 80 sudo ufw ...
John's user avatar
  • 141
4 votes
3 answers
12k views

Minikube. How to allow access to local mySQL database from container

I'm trying to access to local MySQL database from minikube container. My minikube works on Windows 10 with hyper-v driver. I found a few solutions (creating host-only network from VirtualBox) but ...
Denis Lopatin's user avatar
4 votes
1 answer
25k views

Ubuntu Apache Server 503 Error: disabled connection for (localhost)

in a bit of a bind here. I'm trying to move a website (www.monkhouselaw.com) from one hosting company to my Digital Ocean VPS. I've changed the DNS settings to: * -> 107.170.29.18 www -> 107....
CGriffin's user avatar
  • 163
4 votes
2 answers
6k views

Arbitrary loopback ip addresses besides 127.0.0.1

I am developing a web app that has to produce different output based on ip. For testing and during development it would help a lot if I could have more loopback ip addresses besides 127.0.0.1. Is ...
Majid Fouladpour's user avatar
4 votes
1 answer
7k views

Setting up subdomains on localhost

I have been trying to set up a subdomain on my local development environment, dev.localhost. I'm using Ubuntu 11.10 and Apache2. So far, I've edited my host file to include the line 127.0.0.1 dev....
jebriggsy's user avatar

1
2 3 4 5
12