Link to home
Start Free TrialLog in
Avatar of Kyanzes
Kyanzes

asked on

Host multiple websites with IIS7 on Windows Web Server 2008

So, I need to host multiple websites using IIS7.

The default website that comes configured works flawlessly.

I added yet another web site using "Add Web Site" under "Sites":

site name: portal
application pool: portal
physical path: C:\portaldirectory
type: http
IP address: All Unassigned
port: 80
host name: portal.mydomain.com

When I try to browse there (on the web server or from outside) I get an error:
"Internet Explorer cannot display the webpage"

No HTTP error code or anything like that.

The configuration of my default web site is as follows (which works flawlessly):

site name: default web site (doh)
application pool: DefaultAppPool
Physical path: %SystemDrive%\inetpub\wwwroot
type: http
port: 80
IP address: *

When I browse to mydomain.com, the default website loads as intended.

What could be the problem here? I didn't set anything else outside of IIS7 (merely mentioning it so you wouldn't assume that I have set other possible settings that come naturally for someone who knows what they are doing)

Thanks in advance!
Andras









Avatar of gtworek
gtworek
Flag of Poland image

Does portal.mydomain.com name is properly resolved by DNS?
What simple "ping portal.mydomain.com" says?
Avatar of Kyanzes
Kyanzes

ASKER

Ping request could not find the host portal.mydomain.com

(I obviously tried the real domain of course.)
So it looks like you did not add A (or CNAME) record in your DNS zone for "mydomain.com".
Where your DNS for mydomain.com is located? It's your own DNS? Or is maintained by an ISP?
Your client has to resolve name to an IP address. It's usually done by DNS. And then using this IP can send packets to your webserver. In these requests there are special field "Host header" indicating hostname you've asked for. And IIS serves proper website.
If first step fails - address remains unknown, packets are not sent and entire solution cannot work.
Avatar of Kyanzes

ASKER

It's self maintained. I'm starting to get the feeling that I should not have spent half a night skimming through IIS7 configuration threads :)
ASKER CERTIFIED SOLUTION
Avatar of gtworek
gtworek
Flag of Poland image

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
Avatar of Kyanzes

ASKER

All right. I can't try it before Monday since I don't have the account info with me (doh). Will try it then. Thanks so far.
ok. Just ask when you try. Or report a success ;)
you don't assign the Host Header on every website your create.
1 more way to run your website.
just change the the ports
example

on browser
1st website
http://mydomain.com:80/
2nd website
http://mydomain.com:81/

and so on

if u want single port used for multiple website then you user "Host Header" option in every website.

@
if u want single port used for multiple website then you use "Host Header" option in every website.
Login to your domain panel and under A records add  this

*.yourdomain.com pointing to your servers ip.

Then add domain in your iis and type xyz.yourdomain.com and add that same under host header. That should do the job. Wait for few seconds for dns to Reflect changes.
Avatar of Kyanzes

ASKER

Thanks!