From: Hartbypass on 14 May 2010 09:14 Hello, I have seen a number of posts about this, but not a clear explanation that matches my scenario that I can use to resolve. We have 5 separate websites that all point to the the same physical directory on the IIS Server. Each site has a different host header and a different home page, but shares other content in the same directory. When I try to setup in IIS the default document, it changes the default document for the other sites. For example: www.site1.com default1.asp www.site2.com default2.asp www.site3.com default3.asp www.site4.com default4.asp www.site5.com default5.asp Each time i move the specific one to the top it because the primary for all the other sites. These are asp sites. If I need to modify the system.webserver area of the web.config, that's fine, I just need to know the syntax. Thanks, Greg
From: Ken Schaefer on 14 May 2010 12:47 If your websites all point to the same physical location, then you only have a single physical web.config file. When you alter the default document in that file, then it will be changed for all websites (because they all are reading the same physical web.config). Try this instead. In applicationHost.config, define multiple <location> settings: <location path="website1"> <system.webServer> <defaultDocument> <!-- your setting here --> </defaultDocument> </system.webServer> </location> <location path="website2"> <system.webServer> <defaultDocument> <!-- your setting here --> </defaultDocument> </system.webServer> </location> etc Cheers Ken "Hartbypass" <hartbypass(a)gmail.com> wrote in message news:4a03c9cf-b5ed-45ab-99f2-e00236e0d6f5(a)37g2000yqm.googlegroups.com... > Hello, > > I have seen a number of posts about this, but not a clear explanation > that matches my scenario that I can use to resolve. > > We have 5 separate websites that all point to the the same physical > directory on the IIS Server. Each site has a different host header > and a different home page, but shares other content in the same > directory. > > When I try to setup in IIS the default document, it changes the > default document for the other sites. For example: > > www.site1.com default1.asp > www.site2.com default2.asp > www.site3.com default3.asp > www.site4.com default4.asp > www.site5.com default5.asp > > Each time i move the specific one to the top it because the primary > for all the other sites. These are asp sites. If I need to modify > the system.webserver area of the web.config, that's fine, I just need > to know the syntax. > > Thanks, > Greg >
From: Hartbypass on 15 May 2010 00:27 On May 14, 12:47 pm, "Ken Schaefer" <kenREM...(a)THISadOpenStatic.com> wrote: > If your websites all point to the same physical location, then you only have > a single physical web.config file. When you alter the default document in > that file, then it will be changed for all websites (because they all are > reading the same physical web.config). > > Try this instead. In applicationHost.config, define multiple <location> > settings: > > <location path="website1"> > <system.webServer> > <defaultDocument> > <!-- your setting here --> > </defaultDocument> > </system.webServer> > </location> > > <location path="website2"> > <system.webServer> > <defaultDocument> > <!-- your setting here --> > </defaultDocument> > </system.webServer> > </location> > > etc > > Cheers > Ken > > "Hartbypass" <hartbyp...(a)gmail.com> wrote in message > > news:4a03c9cf-b5ed-45ab-99f2-e00236e0d6f5(a)37g2000yqm.googlegroups.com... > > > > > Hello, > > > I have seen a number of posts about this, but not a clear explanation > > that matches my scenario that I can use to resolve. > > > We have 5 separate websites that all point to the the same physical > > directory on the IIS Server. Each site has a different host header > > and a different home page, but shares other content in the same > > directory. > > > When I try to setup in IIS the default document, it changes the > > default document for the other sites. For example: > > >www.site1.comdefault1.asp > >www.site2.comdefault2.asp > >www.site3.comdefault3.asp > >www.site4.comdefault4.asp > >www.site5.comdefault5.asp > > > Each time i move the specific one to the top it because the primary > > for all the other sites. These are asp sites. If I need to modify > > the system.webserver area of the web.config, that's fine, I just need > > to know the syntax. > > > Thanks, > > Greg- Hide quoted text - > > - Show quoted text - Thanks, but I just can't get it working. I have added the info to the applicationHost.config using: %windir%\system32\inetsrv\appcmd.exe set config "Website1" - section:system.webServer/defaultDocument -+files. [value='default1.asp'] -commitpath:apphost Seems to add right. Tried to do an IISReset, but the default page does not change for the different sites within the same directory. Is there something I need to do to the web.config as well. Any more thoughts?
|
Pages: 1 Prev: Strange LOCK problems with WebDAV upload in IIS7.5 Next: Networksolution and IIS |