Link to home
Start Free TrialLog in
Avatar of seddleman
seddleman

asked on

How to access non-default web site using IP address or localhost?

I'm trying to do some testing with IIS7 and I'm running several public accessed websites on IIS6.  In testing before the switch, I discovered something that I can't figure out how to do... in both IIS6 and IIS7.  

All sites on IIS6 are listing on port 80 but with different identities (bindings).  It works fine, but if I wanted to access either old or new IIS servers to look at the various sites by typing the machines IP address or on the server by typing "http://localhost" all we see is the default web site.  How can I specify a specific website I'm interested in testing.  

for example, I tried: http://localhost:80:mysite.com --- get an error on the local host.
if on another machine I type http://xx.xx.xx.xx:80:mysite.com it defaults back to default web site.

Is there a way to do this, and if so, what is it?
Avatar of seddleman
seddleman

ASKER

I'll add the comments, yes it works when I use another port, but that's not really what I'm asking for since it's my understanding that port 80 is what the real world uses.  Is there a way to set each website on a different port, (e.g. port 81, 82, 83...) and have the real world stumble across the web sites.  If so, please enlighten me.

Thanks, seddleman
You might consider moving this question to a more appropriate zone.

The Lounge is for relaxation/recreation.  There are jokesters lurking about, so don't be offended at any pokes.

You are looking at a DNS issue, accompanied by port direction.

1. if you don't have DNS setup, you can enter hosts locally on your machine...thus 'google.com' would go to whatever IP address you designate

2. the host can be configured to listen for HTTP traffic on port 80 for multiple host names.  For instance 'google.com' and 'yahoo.com'.  In IIS, you can set each site to use the same IP address and same port.  When the request comes to the machine (routed by IP address), IIS reads the requests, matches it the appropriate site, and directs the traffic.  But, for this to work, you need to have DNS configured correctly (or, if testing, edit each hosts or localhosts files to point to the correct test server)

3. if you're still intent on using port re-direction, the URL should be http://host.domain.tld:123 , where 123 is the port number.
ASKER CERTIFIED SOLUTION
Avatar of Jones911
Jones911

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial