1

I am running windows 7 - installed IIS and created a new site.

I set this site to run on port 8080.

Currently, if i visit http://192.168.2.150:8080/ or localhost:8080, i can hit my site.

Other computers on the network can hit my site if they go to http://192.168.2.150:8080/ .

The question - How can i setup some sort of rule that tells the domain computers that if they go to teehut.com, it takes them to my page hosted on IIS? Is this what a DNS does? Or can i just setup some simple rule in IIS, that applies just to my local network/domain.

I am a total networking nub, keep this in mind when answering ;)

jordan
  • 111
  • 2

1 Answers1

2

First you need some sort of DNS setup. The quickest, dirtiest way is to add an entry to each system's hosts file. The entry would look like: 192.168.2.150 teehut.com in the system's hosts file.(%windir%\system32\drivers\etc\hosts in Windows.) This is a pain to administer, however. You'll want to look into a local DNS system such as dnsmasq or bind if you need something more powerful. The port is a separate issue. I think IIS will handle 8080 as it is the standard alternate HTTP port. I'm not too sure, as I mostly do Linux web servers. If it doesn't handle it you can look into a rewrite rule such as:

<rewrite>
    <rules>
        <rule name="RedirectTo8080" stopProcessing="true">
        <match url=".*" />
        <action type="Redirect" url="http://192.168.2.150:8080/{R:0}" />
    </rule>
    </rules>
</rewrite>