views:

261

answers:

3

Hello,

at home i have a simple network setup conatining 2 machines.

On one machine i have a site hosted with IIS7. Rather than the standard localhost/index.htm address i have added an entry in the HOSTS file pointing the local ip (127.0.0.1) to this domain - www.mysite.dev.

i can access the site with www.mysite.dev with no problem.

what i would like to do is be able to view this site from my other machine on the network.

initially i assumed this could be done with a url like so MACHINE-NAME/www.mysite.dev, but the connection always times out. But I can ping MACHINE-NAME without problems.

For testing purposes i have diabled the windows firewall on both machines but to no joy.

Like a typical web developer, my techy/network skills are pretty poor.

Can anyone see where im going wrong ??

thank you for your time

Truegilly :)

A: 

First of all, try to connect to the LAN IP of your server. If IIS is set up with only one web site, chances are that your site is going to pop up.

If you want to access it by name, you would have to add an entry in the HOSTS file of every client PC you want to view the site with (not to 127.0.0.1 obviously, but to the local IP address of your server).

Also, your Firewall needs to be configured to accept incoming calls on Port 80.

This is usually the point where it makes more sense to set up a DNS service that you can register names like "mysite.dev" with centrally, without having to dabble with hosts files. But that's a different story, and belongs to superuser.com or serverfault.com.

Pekka
A: 

127.0.0.1 always points to localhost. On your home network you should have an IP address assigned by your internet router (dsl/cablemodem/whatever). You need to bind your website to this address. You should then be able to use the machine name to get to the website, but I would recommend actually editing the hosts file of the client computer in question to point a specific name at that computer. The hosts file can be found at c:\windows\system32\drivers\etc\hosts (use notepad) and the entry would look like:

192.168.1.1     mycomputername
Joel Etherton
A: 

hello, thanks for both your responses,

ok what ive had a play and im still having problems.

my network consists of 1 belkin router, and 2 PC's. 1 PC hosts IIS and the sites, the other is the one i want to be able to view them on.

The LAN IP of the router is the standard belkin 192.168.2.1 which when entered into a browser brings up the routers options.

ok the IP address of the PC that hosts IIS and the sites is 192.168.2.3.

am i right in saying that once the firewall is disabled (not sure what i need to set to allow this) the the URL on the other PC would be 192.168.2.3/sitename/index ??

thanks for any help

truegilly

Truegilly