Re: 2 Subdomains - 1 IP Address

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Rob (fake_at_fake.com)
Date: 01/25/05


Date: Tue, 25 Jan 2005 06:33:59 GMT

Jeff,

Thanks for the input. As pointed out in my previous email I am almost 100%
sure (never say 100% ;)) that the home directory and default documents are
configures right. Also from your comments I think my understanding on how
IIS works is correct. The real reason for my problem seems to be that IIS
*THINKS* that site2 has no default documents defined (see comments bellow).
Any idea why that could be?

Regards,
Rob
"Jeff Cochran" <jeff.nospam@zina.com> wrote in message
news:41fa7300.1495003721@msnews.microsoft.com...
> On Mon, 24 Jan 2005 07:43:53 GMT, "Rob" <fake@fake.com> wrote:
>
> >Jeff,
> >
> >Thanks a lot. Actually, I think I am doing what you suggest. In any case,
> >let me list the exact settings I have:
> >
> >Site1:
> >Home Directory: A directory located on this computer
> >Home Directory: Local Path: D:\inetpub\wwwroot\site1 (read, log visits,
> >index this resource)
> >Documents: Default.htm, Default.asp, Default.aspx
> >Web Site: Description = site1
> >Web Site: IP Address - 192.168.1.100
> >Web Site: TCP Port - 80
> >Web Site: Host Header name: site1.gotdns.com and www.site1.gotdns.com
> >
> >Site2:
> >Home Directory: A directory located on this computer
> >Home Directory: Local Path: D:\inetpub\wwwroot\site2 (read, log visits,
> >index this resource)
> >Documents: Default.htm, Default.asp, Default.aspx
> >Web Site: Description = site2
> >Web Site: IP Address - 192.168.1.100
> >Web Site: TCP Port - 80
> >Web Site: Host Header name: site2.gotdns.com and www.site2.gotdns.com
> >
> >So I am not using wwwroot as the home directory for either site but a
> >subdirectory of wwwroot.
> >
> >Also I have the following entries in my hosts file:
> >192.168.1.100 site1.gotdns.com
> >192.168.1.100 www.site1.gotdns.com
> >192.168.1.100 site2.gotdns.com
> >192.168.1.100 www.site2.gotdns.com
> >
> >http://localhost/site1 works
> >http://localhost/site1/default.htm works
> >http://site1.gotdns.com works (from behind the router)
> >http://www.site1.gotdns.com works (from behind the router)
> >
> >http://localhost/site2 does not work (Directory Listing Denied)
> >http://localhost/site2/default.htm works
>
> Then the default document isn't set to be (or include in the list)
> "default.htm". (Which I hate to point out is the first response to
> your problem you received...)

As I said many times the path and default document for site1 and site2 were
set correctly. I have left default documents at the default values
(default.htm, default.asp, default.aspx) and double and tripple checked that
the home directory and documents for site1 and site2 were set correctly as
well as that default.htm is actually present in the home directory.

> >http://site2.gotdns.com works (from behind the router)
> >http://www.site2.gotdns.com works (from behind the router)
> >
> >Ok, I just did some checks on the Default Web Site and discovered that
the
> >Default Document was set to something non-existing. After I have changed
the
> >Default Document for the Default Web Site to Default.htm, Default.asp,
> >Default.aspx (home directory=d:\inetpub\wwwroot) http://locahost/site2
now
> >works (I also replaced it with the new content and only got a
configuration
> >Error "<authentication mode="windows"/>) So I guess it might work now.
What
> >I do not understand is why the default document for the default web site
> >matters. Shouldn't IIS first check for the most specialist case, i.e. my
> >site2 entry?
>
> If you don't specify a document/file and just use the URL with a
> folder/site, then IIS goes to the default document list to see what
> you've told it to server when no specific document is requested. If
> the documents listed in the default document list don't exist, IIS
> checks to see if you've allowed directory browsing. If not, then you
> get a "Directory Listing Denied" message. IIS hasn't a clue what to
> send, and you've told it not to send a directory for a folder.

That was my understanding. What did confuse me, though, is that when I
changed the default document for the default website my site2 suddenly
started to work. If I say //localhost/site2 I expect IIS to first go to the
Home Directory specified for site2 and look for one of the documents listed
in default documents for site2. So it shouldn't matter at all what the
entries are for the default website. Maybe I am wrong with this but that is
what I would expect IIS to do.

In any case, I did some more experiments and and discovered something
interesting. When I change the default documents for the default website and
then apply the changes I get a dialog box saying the following: "The
following child nodes also define the value of the "Default Document"
property, which overrides the value you have just set. Please select from
the list bellow those nodes which should use the new value." Child Nodes:
Printers, site1. It does not list site2. That seems to indicate that IIS
thinks site2 has no default documents defined. But again, I double and
triple checked that they are defined.

> >Only when it doesn't find a match for the more specialist case
> >it will move up to a less specialist case until it reaches the default
web
> >site? Then when it still does not find a match it produces an error. If
that
> >is not the case then in the default web site I would have to define all
the
> >default documents for all my websites hosted on my server. Is that so?
>
> Yep. Every site needs a default document list if it is to serve a
> file when none is requested. *Or* you can allow directory listing,
> which shows every file and folder in the directory with READ
> permissions (Actually I think it's FILE SCAN permission...).
>
> Jeff
>
> >Regards,
> >Rob
> >
> >"Jeff Cochran" <jeff.nospam@zina.com> wrote in message
> >news:41f6706c.1428811752@msnews.microsoft.com...
> >> On Sun, 23 Jan 2005 18:23:55 GMT, "Rob" <fake@fake.com> wrote:
> >>
> >> >Jeff,
> >> >
> >> >Thanks for your input.
> >> >
> >> >In a first step I try to test my setup locally thinking that if it
> >doesn't
> >> >work locally then it certainly won't work from the outside. So I am
using
> >> >"//localhost/site1" and "//localhost/site2". The two web sites are in
> >> >different directories but right now have the same content to remove
any
> >> >additional variables.
> >> >
> >> >Anyways, I am a newbie to this so maybe I am doing something
conceptually
> >> >wrong. I want two completely different websites. On my server I have
them
> >in
> >> >the directories D:\Inetpub\wwwroot\site1 and D:\Inetpub\wwwroot\site2.
> >There
> >> >is only one dynamic IP address for these two sites. To the internet
the
> >> >websites are known as http://www.site1.gotdns.com/ and
> >> >http://www.site2.gotdns.com/ The gotdns.com domain belongs to
dyndns.org
> >> >(not me). I have registered the two subdomains site1 and site2 with
them
> >and
> >> >they point any access to these two subdomains to the IP address (my
> >dynamic
> >> >IP) associates with these two subdomains. On my DSL router I opened
port
> >80
> >> >and forward any incoming traffic to that port to my server with the
> >static
> >> >IP address 192.168.1.100. Then I am using host headers two distinguish
> >> >between the two sites. So my Web Site Identifications look like
> >> >
> >> >Description: site1
> >> >IP Address: 192.168.1.100
> >> >TCP Port: 80
> >> >Host Header Name: site1.gotdns.com and www.site1.gotdns.com
> >> >
> >> >Description: site2
> >> >IP Address: 192.168.1.100
> >> >TCP Port: 80
> >> >Host Header Name: site2.gotdns.com and www.site2.gotdns.com
> >> >
> >> > As mentioned I first try to test these two sites locally using
> >> >"//localhost/site1" and "//localhost/site2". site1 works but site2
gives
> >me
> >> >a "Directory Listing Denied". Again, both sites have the same content
and
> >> >the home directory and default websites are set correctly.
> >>
> >> I understood all that. Except the host header you're directing to the
> >> individual sites is "www.site2.gotdns.org" and the host you're
> >> requesting is "localhost". It don't work like that. You're actually
> >> retrieving the default web site for either localhost call you're
> >> making.
> >>
> >> Now, configure two *sites*. The root of each site should be for that
> >> site only, not wwwroot/site#. If you have the web root (home
> >> directory) for each site as that subdirectory of wwwroot it's okay,
> >> just neither sites can use wwwroot as the site's home directory.
> >>
> >> Now, either create an internal DNS or enter two site names into your
> >> HOSTS file pointing to the internal IP your site answers on. Add a
> >> second host header to each site matching that host name. So if your
> >> HOSTS file was:
> >>
> >> localhost 127.0.0.1
> >> site1 192.168.1.1
> >> site2 192.168.1.1
> >>
> >> Then your host headers would be "site1" and "site2"
> >>
> >> See:
> >>
> >> Running mutiple web sites on a single IP address:
> >> http://www.iisanswers.com/Top10FAQ/t10-hostheaders.htm
> >> http://www.iisanswers.com/articles/dns_for_iis.htm
> >>
> >> Jeff
> >>
> >> >Regards,
> >> >Rob
> >> >
> >> >"Jeff Cochran" <jeff.nospam@zina.com> wrote in message
> >> >news:41f3c9e5.1386181453@msnews.microsoft.com...
> >> >> On Sun, 23 Jan 2005 08:26:35 GMT, "Rob" <fake@fake.com> wrote:
> >> >>
> >> >> >Kristofer,
> >> >> >
> >> >> >Thanks a lot for your reply. Yes, the Home Directory and Documents
> >have
> >> >been
> >> >> >set correctly (Documents lists Default.htm first which is exactly
the
> >> >> >starting page I have in my directory).
> >> >> >
> >> >> >Yes, site1.gotdns.org and site2.gotdns.org are in two different
> >> >subfolders.
> >> >> >I want to host two completely different websites. I have dyndns.com
> >> >forward
> >> >> >requests to site1.gotdns.org and site2.gotdns.org to my server. On
my
> >DSL
> >> >> >router I have opened port 80 and setup the host headers. In any
case,
> >I
> >> >> >think the problem I have is independent of anything outside my
network
> >> >> >because I am not even able to access //localhost/site2 while
> >> >> >//localhost/site1 works just fine.
> >> >>
> >> >> Obvious question, but what are the *exact* url's you're using to
> >> >> access the sites? As you've written them here, these are the same
> >> >> site with two subdirectories, not two sites.
> >> >>
> >> >> Jeff
> >> >
> >> >
> >> >> >"Kristofer Gafvert" <kgafvert@NEWSilopia.com> wrote in message
> >> >> >news:xn0dxlcdy4azb1500f@news.microsoft.com...
> >> >> >> Hello Rob,
> >> >> >>
> >> >> >> The "Default Document" is probably not correctly configured.
Right
> >> >click
> >> >> >> the website, click Properties, and click on the Documents tab.
Move
> >the
> >> >> >> document you want as default document to the top.
> >> >> >>
> >> >> >> But, i would not consider this setup to be two
subdomains/websites.
> >It
> >> >> >> looks like site1.gotdns.org and site2.gotdns.org is two
> >> >> >> subfolders/virtually directories. Are you sure you want to have
> >this?
> >> >> >>
> >> >> >> --
> >> >> >> Regards,
> >> >> >> Kristofer Gafvert
> >> >> >> www.gafvert.info - My articles and help
> >> >> >> www.ilopia.com
> >> >> >>
> >> >> >>
> >> >> >> Rob wrote:
> >> >> >>
> >> >> >> > Dear All,
> >> >> >> >
> >> >> >> > I have spent countless hours to solve this problem so I hope to
> >get
> >> >some
> >> >> >> > help here. I want to host two subdomains on my server running
> >windows
> >> >> >> 2000
> >> >> >> > Server SP4. Unfortunately, I am able to only access one of the
two
> >> >site
> >> >> >> > locally. //localhost/site1.gotdns.org shows up correctly but
> >> >> >> > //localhost/site2.gotdns.org gives me a "You are not authorized
to
> >> >view
> >> >> >> this
> >> >> >> > page - HTTP Error 403 - Forbidden Internet Explorer" (friendly
> >> >message)
> >> >> >> > "Directory Listing Denied" (non friendly message) message. Both
> >sites
> >> >> >> have
> >> >> >> > been setup the same way (I even tried the setup in reversed
> >sequence)
> >> >> >> and I
> >> >> >> > verified that both settings are the same (Folder settings: Web
> >> >Sharing,
> >> >> >> > Sharing, Security) and IIS settings (Directory Security, HTTP
> >> >Headers,
> >> >> >> Web
> >> >> >> > Site, etc,). I researched a lot on the internet but was unable
to
> >> >figure
> >> >> >> out
> >> >> >> > what is going on. Any input is highly appreciated.
> >> >> >> >
> >> >> >> > Regards
> >> >> >
> >> >>
> >> >
> >>
> >
>



Relevant Pages

  • Re: 2 Subdomains - 1 IP Address
    ... >Home Directory: A directory located on this computer ... I just did some checks on the Default Web Site and discovered that the ... Shouldn't IIS first check for the most specialist case, ... >> second host header to each site matching that host name. ...
    (microsoft.public.inetserver.iis)
  • Re: configuring Internet info server
    ... >and edit the 'default web site' properties. ... >found under the 'Home Directory' tab where you can ... >this is sufficient for the introduction page in IIS. ... The home directory is wherever you configure it on that same tab. ...
    (microsoft.public.inetserver.iis)
  • Permission problems
    ... I have set up a new web site under iis 5 and everything works great, ... home directory. ... TIA ...
    (microsoft.public.frontpage.extensions.windowsnt)
  • Permissions problem
    ... I have set up a new web site under iis 5 and everything works great, ... home directory. ... TIA ...
    (microsoft.public.inetserver.iis)
  • Re: 2 Subdomains - 1 IP Address
    ... Home Directory: A directory located on this computer ... Web Site: IP Address - 192.168.1.100 ... Web Site: Host Header name: site1.gotdns.com and www.site1.gotdns.com ... http://www.site1.gotdns.com works (from behind the router) ...
    (microsoft.public.inetserver.iis)