0

I'm runnning IIS 7 on my local dev machine. My website is up and running. To access the website, I need to enter the url with the port number in the browser's address bar (www.ScoobyDoo.dev:91). What do I need to change so I only need to enter the www.ScoobyDoo.dev portion of the url? I've done this before but I'm drawing a blank. Port 80 is hosting a different website so I can't just move this one to the default http port.

Thanks!

DenaliHardtail
  • 27,362
  • 56
  • 154
  • 233

2 Answers2

5

If you want multiple sites to reside on the same IP address then you need to use HTTP Host Headers.

Provided that your existing website doesn't use SSL then you can use host headers. To configure host headers in IIS7 you modify the "Bindings" (there's a menu item for this in the right hand side Actions pane for the site):

alt text

You want to add/edit your bindings for each site that resides on the same IP address, for example for your scoobydoo.dev site: alt text

The caveat here is that if you have users already browsing your first site by IP address then they will need to be redirected to the site using its domain name.

You can do this by adding a site bound to the raw IP address and creating a HTTP Redirect.

Kev
  • 118,037
  • 53
  • 300
  • 385
0

I'm not sure what you're expecting to do here. If something else is binding to port 80, and your web server is binding to port 91, then you'll need to specify port 91 in the web browser when making a request to the server. By default, without being explicitly given a port in the address, a web browser will make the request on port 80 (or 443 for SSL).

You might be able to add an entry to your hosts file (c:\windows\system32\drivers\etc\hosts) where you map the non-specified port version to the specified port version, but I don't think it'll work. That file is for DNS resolution, not port mapping. Worth a try though, I suppose.

Can you clarify a bit on what exactly you're expecting? Or what you think you may have done before? I wonder if you're not giving us the whole picture here.

David
  • 208,112
  • 36
  • 198
  • 279
  • I understand needing to enter the port when the default port is in use by a different site but I recall a technique that let us map www.abc.com to 127.0.0.1:xx. I just don't recall the steps. I also tried adding an entry to the hosts file but that didn't work. There really isn't anything else to the "whole picture". This is a pretty basic test site / question. What details do you think I'm leaving out? – DenaliHardtail Jan 01 '11 at 21:33