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

learn more… | top users | synonyms

85
votes
2answers
32k 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 ...
72
votes
14answers
64k 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 m /etc/hosts/ file? If it's not possible, how do I work around this problem? I need ...
29
votes
7answers
56k views

Why is the response on localhost so slow?

I am working on a tiny little PHP project for a friend of mine, and I have a WAMP environment setup for local development. I remember the days when the response from my local Apache 2.2 was immediate. ...
14
votes
8answers
15k 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, ...
13
votes
4answers
23k 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 ...
11
votes
1answer
13k 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 ...
10
votes
6answers
15k 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 ...
9
votes
3answers
6k 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, ...
8
votes
3answers
6k 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 ...
7
votes
3answers
2k 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> ...
6
votes
3answers
3k 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 ...
6
votes
2answers
17k 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 ...
6
votes
3answers
8k 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 ...
5
votes
4answers
4k 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 ...
5
votes
1answer
6k views

Configure Postfix to only allow outgoing mail from localhost

How do I configure the Postfix mail submission agent to only allow emails to be sent out from a user on localhost , but allow the Postfix mail transfer agent to receive mail from anywhere? Martin
5
votes
2answers
5k views

nginx with php-fpm downloading php files rather than executing them on mac os x (local environment)

I'm having trouble getting PHP files to execute on my local development machine. I seem to have successfully installed nginx and php-fpm also seems to be correctly installed, and running but can't ...
4
votes
7answers
25k 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 ...
4
votes
6answers
13k 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 ...
4
votes
2answers
8k views

Sendmail to local domain ignoring MX records (part 2)

I have the exact problem, like in this post: http://serverfault.com/questions/25068/sendmail-to-local-domain-ignoring-mx-records I am also using email provider like GMail For Your Domain (which stores ...
4
votes
3answers
808 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 ...
4
votes
1answer
1k 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 ...
4
votes
1answer
597 views

Connecting to localhost resolves 127.0.0.1 but connects with external IP [Linux, Debian]

I'm having a problem with a dedicated server, I don't known if it's the default behavior but this is the problem: If I connect to a service located on the server with localhost the service gets as ...
3
votes
3answers
2k 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 # ...
3
votes
2answers
184 views

Is it good to define localhost as 127.0.0.1 in your hosts file?

I just came across a server that does not respond to things like ping localhost or mysql -h localhost - I believe this is because localhost is not defined in the hosts file. On just about every ...
3
votes
4answers
1k views

Virtual hosts on same ip AND port

Is this even possible? My current vhost.conf entries: <VirtualHost www2.b-page.lv:80> ServerAdmin example@example.com DocumentRoot "C:/xampp/htdocs/b-page" ServerName b-page ...
3
votes
3answers
5k views

Strange redirect to localhost! http://dp.000.in/?

I just accidentally typed imadb.com and after 2 redirects (I think) I ended up at: http://dp.000.in/ You can imagine my surprise when I noticed I was seeing my webpages on my local host! Can someone ...
3
votes
1answer
99 views

Do local cURL requests count towards my network transfer limit?

I have a purchased a hosting that allows me 10 GB of monthly transfer. Will this 10 GB of transfer be affected if I make some cURL requests, from-a-script-to-a-script on the same server (in this case ...
3
votes
2answers
10k 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 ...
3
votes
2answers
39k views

Accessing localhost (xampp) from another computer over LAN network - how to? [closed]

I have just set up a wi-fi network at home. I have all my files on my desktop computer (192.168.1.56) and want to access localhost over there from another computer (192.168.1.2). On my desktop I can ...
3
votes
2answers
14k views

How to free port 80 for xampp to work [closed]

Please help, I used to be running xampp and it was working perfectly. Then I wanted to try something out and I ran IIS instead of xampp. Now I want to go back to using xampp, but whenever I try to run ...
3
votes
1answer
5k views

Failed to connect to MySQL at localhost

I recently installed MySQL on my machine using MySQL installer. I am using it as part of an Apache Tomcat server I'm running on localhost. I linked the database to Netbeans and everything was ...
3
votes
4answers
4k views

Is it Possible to view my apache server (local host) from home or remote computer that is outside my LAN?

i am developing a website and need to share progress with other stakeholders. Is it Possible to view my apache server (local host) from home or remote computer that is outside my LAN?
3
votes
1answer
414 views

How to reset and persist the hostname and FQDN of an WIdows 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 ...
3
votes
8answers
5k views

SQL Server 08 Express error when connecting to localhost - “Timeout expired”. Works with ::1 or 127.0.0.1

EDIT New info: Navigating to localhost:1434 in Chrome gives me an "ERR_EMPTY_RESPONSE", while other ports give me an "Oops! This link appears to be broken". So it seems to binding ok there? So ...
2
votes
3answers
2k views

Redhat doesn't set my desired hostname on reboot

I have a redhat (EL5) server that I need to change the hostname on. I'm trying to put it back into a known state to help with server provisioning activities. As part of changing the hostname, I'm ...
2
votes
6answers
5k 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 ...
2
votes
3answers
1k 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 ...
2
votes
3answers
10k 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 ...
2
votes
3answers
608 views

VPS set up for MySQL

Our VPS is set up in such a way that all databases are accessible from any domain via localhost and the username/password/dbname. Is this the usual set up, or should there be some way of 'jailing' ...
2
votes
2answers
387 views

Subdomains on localhost

It is possible to use wildcard in /etc/hosts file? For example, im developng the application that will have user-defined subdomains, like "user1.foo.bar", "user2.foo.bar". Im looking for something ...
2
votes
4answers
1k views

Best way to run two different websites on localhost [closed]

I'd like to run two websites with XAMPP for Linux on my computer: One for my public website development One for my thesis (bibliography management, abstracts, ...) They are totally unrelated and I ...
2
votes
3answers
4k views

Wireshark won't pick up packets sent from localhost to localhost via network [duplicate]

I'm running on Windows and trying to get Wireshark to pick up my network traffic. It picks up all outbound and inbound traffic fine, except for a client/server I'm running on my local system. As it ...
2
votes
3answers
6k 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' ...
2
votes
3answers
1k views

editing apache vhosts and ubuntu hosts file?

I have just installed ubuntu (11.04). I have installed apache/mysql/php etc. I have a few sites sitting in /var/www/site1 /var/www/site2 /var/www/site3 I want to be able to access these at ...
2
votes
2answers
951 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 ?
2
votes
4answers
2k views

MySQL Database is DROPPED can I recover it (on localhost)

Is there anyway to get my database back? I've dropped it accidentally.
2
votes
3answers
2k views

Why is the localhost entry missing in hosts file?

I have had this problem twice (on two different computers), that the localhost entry is missing from the host file. How could this have happened? The computer was installed with Windows Vista SP1, ...
2
votes
2answers
265 views

When using netstat on a listening port what is the difference between localhost:6666 and [::]:6666 in 'Local Address' field

Using ubuntu 11.04, I run netstat -nplt the results for local address may be localhost:6666 or [::]:6666 What is the difference? I believe that the [::]: binds the service at ...
2
votes
3answers
264 views

Access 127.0.0.1 on a local network

I usually write code, not administer servers, so bear with me here! I'm running a python script to act as a webserver and I also have Apache installed on the same machine. When I run the python ...
2
votes
2answers
290 views

Binding services to localhost and using SSH tunnels - can requests be forged?

Given a typical webserver, with Apache2, common PHP scripts and a DNS server, would it be sufficient from a security perspective to bind administration interfaces like phpmyadmin to localhost and ...