Web app. IIS directory

Sep 8, 2011 at 7:22 AM

Hi...

In a default Windows installation the IIS is placing the files on C-drive.

 

But I would like have the files placed on the D-drive, ex. d:\websites.

I have tried searching IIS setting to change default webfolder, with no luck or my searching skills have been degraded..

Any idea on how to define the webfolder in autospinstaller script or IIS?

 

/Dan

Sep 9, 2011 at 6:38 AM

From: http://forums.iis.net/t/1149270.aspx

This option is detailed by MS here:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/efefcb53-b86e-4cac-9b4b-fcf5f1145aa9.mspx?mfr=true

I do this all the time. I have an answer file with the following items:
-------------------
[Components]
iis_common = on
iis_www = on
iis_inetmgr = on
iis_asp = on
aspnet = on
complusnetwork = on

[InternetServer]
PathWWWRoot = D:\IIS-Data\www
-----------------

Then install from the command line with: Sysocmgr.exe /i:C:\windows\inf\sysoc.inf /u:AnswerFileLocation

In the above example, this will default the install of the WwwRoot directory (and thus new websites created on IIS) to D:\IIS-Data\www\

 

By default, AutoSPInstaller installs the Web Server role for you (or more accurately, the SharePoint 2010 Pre-requisiste installer does this), but you could always do this ahead of time. I'm not sure if the prereq installer can be told to install Web Server role with a specific configuration. Seems like changing the "default" location after installation is a bit more difficult (modify the metabase.xml and perhaps some registry entries).

Sep 9, 2011 at 7:45 AM

HI....

 

Do it work with IIS 7.x???

/dan

Coordinator
Sep 9, 2011 at 2:10 PM

There apparently is no longer a way to pre-define the root location of IIS (beginning with Win 2008 or Win2008 R2). There are published ways to move the location once it's been set up, but that's outside the scope of AutoSPInstaller really. Plus the benefits these days are doubtful, some even view moving Inetpub as an outdated security practice.

More info: http://blogs.iis.net/thomad/archive/2008/02/10/moving-the-iis7-inetpub-directory-to-a-different-drive.aspx

However, moving the IIS logfiles is a very good idea; AutoSPInstaller now provides a means to specify the location of the logs and will can also enable NTFS compression on them. See changeset http://autospinstaller.codeplex.com/SourceControl/changeset/changes/79606 for details.

HTH,
Brian