Re: 2 Subdomains - 1 IP Address
From: Jeff Cochran (jeff.nospam_at_zina.com)
Date: 01/24/05
- Next message: Jeff Cochran: "Re: WWW Publishing Service doesn't start"
- Previous message: David Wang [Msft]: "Re: IIS with ISAPI filter does not respond on load testing"
- In reply to: Rob: "Re: 2 Subdomains - 1 IP Address"
- Next in thread: Rob: "Re: 2 Subdomains - 1 IP Address"
- Reply: Rob: "Re: 2 Subdomains - 1 IP Address"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 Jan 2005 22:18:06 GMT
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...)
>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.
>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
>> >> >
>> >>
>> >
>>
>
- Next message: Jeff Cochran: "Re: WWW Publishing Service doesn't start"
- Previous message: David Wang [Msft]: "Re: IIS with ISAPI filter does not respond on load testing"
- In reply to: Rob: "Re: 2 Subdomains - 1 IP Address"
- Next in thread: Rob: "Re: 2 Subdomains - 1 IP Address"
- Reply: Rob: "Re: 2 Subdomains - 1 IP Address"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|