Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I have two personal computers that are connected to the same modem and I want to make a joint localhost For both of them.

for example i have a localhost on pc1 made by xampp and have a phpmyadmin and 'htdocs'folder, including databases and files. now we want to join them so if we went to localhost on pc2 it showed the same as pc1 and they have common databases. so if we change databases from pc2, the changes can be seen on pc1..

more important part is common phpmyadmin(databases) and in second priority if it's possible the common files.

share|improve this question

You cannot use localhost for access to another computer. It's a loopback address of the network card which means, in this case, you will be redirected to the local computer if you try to use it.

Since you're connected to the same modem you should be on the same network. You have to use the IP address or setup a DNS record for the computer with xampp installed and access it through that.

For example:
PC1 IP address:
PC2 IP address:

Configure apache to allow access from in the \xampp\apache\conf\httpd.conf file. Browse to or for example, from PC2. You could also allow network access to the htdocs\ folder on PC1 and access it from PC2 by typing into explorer or run prompt \\\htdocs\that way to modify files or folders.

Not neccesary but easier than typing in IP addresses:
If you have DNS on your modem you can configure an A-record for it there or you could simply go to the %WINDIR%\system32\drivers\etc\ folder on PC2 and configure the hosts file with a record pointing to

More reading on networking:

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.