Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Basically - I am producing a website and I am trying to share the "localhost" port on 2 computers.

Basically, when I build the project I just want to also be able to access it on both computers via the same port.

Currently, I cant seem to be able to do this ? Anyone can help with step-by-step ?


share|improve this question
up vote 1 down vote accepted

If I'm understanding you right you want localhost on machines A and B to point to the same place -- This is simultaneously exactly what's happening and completely impossible :-)

localhost by convention always points to, the magic loopback IP of the local machine (i.e. on machine A always means machine A; on machine B always means machine B). It's not an address that can be shared between multiple machines (in fact the entire network is reserved for loopback use).

To do what you want you need to connect both machines over a network, assign them non-loopback IPs (private addresses out of, or & run your service over those addresses.

Consult a good networking book for more details...

share|improve this answer
hi :) no sorry maybe I made a mistake. Basically on Machine 1 - its and I want machine 2 to be able to access this address so it can see the website ? – Tom Mar 9 '10 at 16:37
Re-read the answer above: is unique to each machine and cannot be shared across hosts: you must use non-loopback addresses to do what you want. – voretaq7 Mar 9 '10 at 16:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.