WWW FAQs: How do I access a server on my PC from other machines in my home or office?

2005-12-02: "Intranet" websites, private sites for users within a home or office, can be useful for lots of things. And if your home or office PCs can all access the Internet, chances are good that you have an Internet connection sharing router or "gateway" device, like the SMC Barricade, or the Linksys BEFSR81 (just two examples out of many). But what does an Internet sharing device have to do with your Intranet site? Well, if your router is a good one, you'll be able to access your computer from other computers on your home or office network ("LAN," or Local Area Network) by its computer name.

To find our your computer's name, do this (for Windows PCs):

1. Start -> Right-click "My Computer" -> Properties -> Computer Name

2. Look at the "Full computer name" field.

These suggestions are primarily for home and small office networks. In a large corporate network environment you should consult your system administrator before setting up a web server to be accessed by anything other than your own PC.
For instance, the name of my laptop is set to "presentable", and my SMC Barricade gateway/router/wifi hub is smart enough to automatically provide DNS (Domain Name Service) for it. That means that any computer in my house can access:

http://presentable/

To see the web server on my laptop.

Of course, there must be a web server on your PC, and your firewall software (such as Windows XP Personal Firewall) must be set to allow incoming connections on port 80 from other computers on the network. Otherwise, the firewall will stop incoming connections -- that's its job, after all.

If this doesn't work, but you can still access:

http://localhost/

From the same computer that is running the web server, then you probably haven't adjusted your firewall correctly. If you're sure that you adjusted the firewall correctly, it's possible that your router doesn't support DNS. You can work around that by connecting to your PC by IP address instead of by name. You can find out your PC's IP address like this (for Windows PCs):

1. Start -> Run -> Enter cmd.exe and press Enter.
2. At the C:\ prompt, Type ipconfig and press Enter.
3. Your computer's IP address is displayed as part of the output.
4. From another PC on your network, visit:

http://ip address you saw in step 3

You should now see the web server on your PC.

Note: this doesn't make your website public. These steps are intended for those who want to make an "intranet" site for use by other computers on the same local network. See my article how do I host my own website at home? for more information about how to host a publicly accessible website at home.

Share |

Legal Note: yes, you may use sample HTML, Javascript, PHP and other code presented above in your own projects. You may not reproduce large portions of the text of the article without our express permission.

Got a LiveJournal account? Keep up with the latest articles in this FAQ by adding our syndicated feed to your friends list!


Follow us on Twitter | Contact Us

Copyright 1994-2014 Boutell.Com, Inc. All Rights Reserved.