Multiple Websites running IIS

Multiple Websites running IIS

am 29.08.2007 22:19:38 von tomwick1

OK, i am trying to set up multiple website on IIS. I have been trying
for about 2 hours now and going nuts. I want to use the same IP
address so I thought..."OK, simple, just use a host header".

Currently the name of the box that I access internall is testbox

so I just point my browser to this http://testbox and everything works
fine. I created a new website, tried both assigning it the same IP
and leaving them both as un-assigned" and just adding a host header to
the second website call it "testbox2".

I figured when I go to http://testbox I should get site A and when I
go to http://testbox2 I should get site B. But it seems to work fine
to get site A but I can not get site B.

Any ideas?

Re: Multiple Websites running IIS

am 29.08.2007 22:48:29 von Kristofer Gafvert

Did you set up name resolution? The client must be able to contact the
webserver using the name testbox2. If that doesn't work, it does not
matter what you do in IIS.

These two articles may be useful for you to read:

"Understanding Host Headers in IIS"
http://www.gafvert.info/iis/article/understanding_host_heade rs.htm

"Using Host Headers to host multiple websites on IIS 6.0"
http://www.gafvert.info/iis/article/iis_multiple_websites.ht m

--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info


tomwick1 wrote:

>OK, i am trying to set up multiple website on IIS. I have been trying
>for about 2 hours now and going nuts. I want to use the same IP
>address so I thought..."OK, simple, just use a host header".
>
>Currently the name of the box that I access internall is testbox
>
>so I just point my browser to this http://testbox and everything works
>fine. I created a new website, tried both assigning it the same IP
>and leaving them both as un-assigned" and just adding a host header to
>the second website call it "testbox2".
>
>I figured when I go to http://testbox I should get site A and when I
>go to http://testbox2 I should get site B. But it seems to work fine
>to get site A but I can not get site B.
>
>Any ideas?

Re: Multiple Websites running IIS

am 29.08.2007 22:55:03 von tomwick1

So basically your telling me I have to set up a DNS server? I don't
want to use these websites publically. They are just for testing and
development.

Re: Multiple Websites running IIS

am 29.08.2007 22:59:35 von tomwick1

" A DNS Server is not necessary. The hosts file can also be used, but
that means the hosts file must be edited on each client. A CNAME can
also be used instead of an (A) record. What is important however is
that the client machine must find the web server by using the name you
have chosen as host header name, and how the client does this is not
related to IIS. "

Since I do not have a DNS server I am stuck on what to do. So your
saying (or rather this article is saying) that I must edit a host file
for my computer? Hmmm...I am confused. I installed WINS server on
the same machine because I thought that had something to do with it,
but I cant seem to get that done right either.

Re: Multiple Websites running IIS

am 29.08.2007 23:19:48 von Kristofer Gafvert

You must have name resolution working. If you use DNS, hosts file or WINS
server is up to you.

I do however not use WINS, and i don't know if you can assign several
names to an IP address using it, so i cannot give you any guidance in
setting it up.

The point is however that whatever name you set up as host header name in
IIS, must resolve to the IP address of the webserver. Otherwise, the
client will never find the webserver and cannot send the request to it.

--
Regards,
Kristofer Gafvert
http://www.gafvert.info/iis/ - IIS Related Info


tomwick1 wrote:

>" A DNS Server is not necessary. The hosts file can also be used, but
>that means the hosts file must be edited on each client. A CNAME can
>also be used instead of an (A) record. What is important however is
>that the client machine must find the web server by using the name you
>have chosen as host header name, and how the client does this is not
>related to IIS. "
>
>Since I do not have a DNS server I am stuck on what to do. So your
>saying (or rather this article is saying) that I must edit a host file
>for my computer? Hmmm...I am confused. I installed WINS server on
>the same machine because I thought that had something to do with it,
>but I cant seem to get that done right either.

Re: Multiple Websites running IIS

am 30.08.2007 12:09:27 von Daniel Crichton

tomwick1 wrote on Wed, 29 Aug 2007 13:59:35 -0700:

> " A DNS Server is not necessary. The hosts file can also be used, but
> that means the hosts file must be edited on each client. A CNAME can
> also be used instead of an (A) record. What is important however is
> that the client machine must find the web server by using the name you
> have chosen as host header name, and how the client does this is not
> related to IIS. "

> Since I do not have a DNS server I am stuck on what to do. So your
> saying (or rather this article is saying) that I must edit a host file
> for my computer? Hmmm...I am confused. I installed WINS server on the
> same machine because I thought that had something to do with it, but I
> cant seem to get that done right either.

Simplest way is to edit the HOSTS file (look in
c:\windows\system32\drivers\etc ). Just add a single line to the end like this:

127.0.0.1 testbox2

Save it, and now testbox2 will resolve to your local machine. If testbox is
a different machine, just use the same IP that testbox is using. No need for
a DNS or WINS server.

Dan

Re: Multiple Websites running IIS

am 30.08.2007 14:59:59 von tomwick1

>
> Simplest way is to edit the HOSTS file (look in
> c:\windows\system32\drivers\etc ). Just add a single line to the end like this:
>
> 127.0.0.1 testbox2
>
> Save it, and now testbox2 will resolve to your local machine. If testbox is
> a different machine, just use the same IP that testbox is using. No need for
> a DNS or WINS server.
>
> Dan

Dan,
Thank you very much I feel like I am starting to make some headway. I
have added the line to the file and now when I am on the actual server
itself it resolves fine to http://testbox2, but when I try connecting
fron another machine on our network and go to http://testbox2, I get a
"page can not be displayed error".

Do I have to adjust the file on every machine we are working on, or
just the server itself?

Re: Multiple Websites running IIS

am 30.08.2007 15:04:44 von tomwick1

>
> Simplest way is to edit the HOSTS file (look in
> c:\windows\system32\drivers\etc ). Just add a single line to the end like this:
>
> 127.0.0.1 testbox2
>
> Save it, and now testbox2 will resolve to your local machine. If testbox is
> a different machine, just use the same IP that testbox is using. No need for
> a DNS or WINS server.
>
> Dan

Dan,
Thank you very much I feel like I am starting to make some headway. I
have added the line to the file and now when I am on the actual server
itself it resolves fine to http://testbox2, but when I try connecting
fron another machine on our network and go to http://testbox2, I get a
"page can not be displayed error".

Do I have to adjust the file on every machine we are working on, or
just the server itself?

Re: Multiple Websites running IIS

am 30.08.2007 15:09:06 von tomwick1

>
> Simplest way is to edit the HOSTS file (look in
> c:\windows\system32\drivers\etc ). Just add a single line to the end like this:
>
> 127.0.0.1 testbox2
>
> Save it, and now testbox2 will resolve to your local machine. If testbox is
> a different machine, just use the same IP that testbox is using. No need for
> a DNS or WINS server.
>
> Dan

Dan,
Thank you very much I feel like I am starting to make some headway. I
have added the line to the file and now when I am on the actual server
itself it resolves fine to http://testbox2, but when I try connecting
fron another machine on our network and go to http://testbox2, I get a
"page can not be displayed error".

Do I have to adjust the file on every machine we are working on, or
just the server itself?

Thanks again!

Re: Multiple Websites running IIS

am 30.08.2007 15:23:53 von tomwick1

>
> Simplest way is to edit the HOSTS file (look in
> c:\windows\system32\drivers\etc ). Just add a single line to the end like this:
>
> 127.0.0.1 testbox2
>
> Save it, and now testbox2 will resolve to your local machine. If testbox is
> a different machine, just use the same IP that testbox is using. No need for
> a DNS or WINS server.
>
> Dan

Dan,
Thank you very much I feel like I am starting to make some headway. I
have added the line to the file and now when I am on the actual server
itself it resolves fine to http://testbox2, but when I try connecting
fron another machine on our network and go to http://testbox2, I get a
"page can not be displayed error".

Do I have to adjust the file on every machine we are working on, or
just the server itself?

Thanks again!

Re: Multiple Websites running IIS

am 30.08.2007 16:20:45 von Daniel Crichton

tomwick1 wrote on Thu, 30 Aug 2007 05:59:59 -0700:



>> Simplest way is to edit the HOSTS file (look in
>> c:\windows\system32\drivers\etc ). Just add a single line to the end
>> like this:

>> 127.0.0.1 testbox2

>> Save it, and now testbox2 will resolve to your local machine. If
>> testbox is a different machine, just use the same IP that testbox is
>> using. No need for a DNS or WINS server.

>> Dan

> Dan,
> Thank you very much I feel like I am starting to make some headway. I
> have added the line to the file and now when I am on the actual server
> itself it resolves fine to http://testbox2, but when I try connecting
> fron another machine on our network and go to http://testbox2, I get a
> "page can not be displayed error".

> Do I have to adjust the file on every machine we are working on, or
> just the server itself?

Every machine that is going to connect to it. I'd assumed that you were
testing this on a single box - as your doing it on a network, then I'd
suggest you add the name to the DNS server for the network instead so you
don't have edit every hosts file. You do have a DNS server, right? You
might be able to use WINS, but it's been a long time since I messed with it
as all my networks are ADS based now.

Dan

Re: Multiple Websites running IIS

am 03.09.2007 12:56:38 von Andrew Morton

tomwick1 wrote:

> Do I have to adjust the file on every machine we are working on, or
> just the server itself?

Every machine.

Andrew