locked
Change default installation folder c:\inetpub to another volume RRS feed

  • Question

  • User797226040 posted

    Not sure if this is the right forum for this question, but here it goes:

    The default installation folder for IIS is c:\inetpub.  The installation does not allow any obvious way to change that default to something else, such as d:\inetpub.

    C: is always the system volume, and with production servers we like to create two volumes (C and D) and install applications and data on D as much as possible for a whole number of reasons.

    How can one change this default root folder after installing IIS?  Other than hacking the registry (and probably AD while at it), I do not know of any way (MS-supported, that is=safe, reliable) to do it, but don't want to end up with massive amounts of data sitting on C: if it can be avoided.

    Help would be greatly appreciated.
     

    Thursday, May 8, 2008 3:45 PM

Answers

  • User-823196590 posted

    How can one change this default root folder after installing IIS?
    No registry hacking necessary at all - just change it!  I always change my root to D:\inetpub\wwwroot.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, May 8, 2008 4:18 PM
  • User1238244415 posted

    I had the same curiosity of changing the root to another drive.  It is easy and could be done either after you install IIS.  Simply, stop the Default website from the IIS manager, move inetpub folder to the drive of your choice, then change the path to where you want IIS to look for websites.  This is done by right clicking on default website in IIS manager and change all paths you find there to your designated folder/drive. 

    Here is a link from Microsoft on this process.

    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a59a2665-9078-43ef-8b5a-5bf9bcacc95e.mspx?mfr=true

    Enjoy.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, January 10, 2010 2:25 PM
  • User797226040 posted

    Thanks for your info.  It is really useful.

    This is the response I was looking for almost two years ago.

    I wish all that contribute to this post bother to read and understand the post before replying to it and just exhibit their self-centered need to rake up as many posts as possible.  There ought to be a tool to rate posts as helpful or not, so legitimate answers may be sorted out from the trash that others want to pass as a reply.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, January 10, 2010 6:51 PM

All replies

  • User-823196590 posted

    How can one change this default root folder after installing IIS?
    No registry hacking necessary at all - just change it!  I always change my root to D:\inetpub\wwwroot.

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Thursday, May 8, 2008 4:18 PM
  • User797226040 posted

     OK, thanks, but could you elaborate?

     You make it sound like all I have to do is to move the folder itself and IIS will magically know I did that and adjust itself accordingly.

      Also, I need to move not just wwwroot, but the whole c:\inetpub, as I have an application that requires the SMTP server that IIS provides.  (Specially) that folder needs to be moved.

      Will try it out by moving the folder, as you seem to suggest and post accordingly.
     

    Friday, May 9, 2008 3:25 PM
  • User-823196590 posted

    No - you can't just move it.  You have to recreate the folders and then go into the IIS MMC and set the web root to the new path.  Same for SMTP.

    Friday, May 9, 2008 3:39 PM
  • User797226040 posted

     Hi,

    After playing a bit with it, I can now refine my question:

    How can I move the DEFAULT SMTP or WWW sites?  Yes, I can create custom ones, and in the process I can set their folders.  Once that is done, however, I cannot delete the default ones, and neither can I move their folders.  The MMC does not allow either.

    I feel that moving or deleting the default services is needed to prevent my C: volume to fill up with data.  If I cannot do either, what can I do, then?

     Thanks for your patience.
     

    Sunday, May 11, 2008 2:56 AM
  • User-823196590 posted

    I cannot delete the default ones, and neither can I move their folders.  The MMC does not allow either.
    Why?  I do this all of the time with all o fmy servers.  What's the issue?  SImply change all references from C: to another drive.  Use can use the Metabase explorer to make sure all paths are changed:
    http://www.microsoft.com/downloads/details.aspx?familyid=56FC92EE-A71A-4C73-B628-ADE629C89499&displaylang=en

    Monday, May 12, 2008 9:21 AM
  • User1222786384 posted

    Hi,

    I'm having a similar issue with using a different folder for the web sites. In my case, we have the issue where the web site will complete creation successfully, but the Local Path field is displayed as an editable path rather than disabled and containing the \<server> designator.

    Because of this we do not properly redirect to our LDAP server. I installed the Metabase Explorer but couldn't find a field to change the default IIS directory. Also, can we use any folder name or does it have to be inetpub\wwwroot?

    Friday, May 23, 2008 11:13 AM
  • User-823196590 posted

    The physical place you put your files is completely arbitrary.  See my response to your original post ...
    http://forums.iis.net/p/1149496/1870145.aspx#1870145

    Friday, May 23, 2008 1:25 PM
  • User797226040 posted

    Hi, ChristianHowell.  I noticed that the reply to your question has a reference that you had a similar question in another forum thread.

    Yeah, just keep changing forums and ask the same or similar question. Maybe that way you can find someone else that will give you an actionable answer, that is, one that is applicable to IIS 6.0 "out of the box" and that you (and we) can actually use.


    Saturday, May 24, 2008 12:56 PM
  • User1222786384 posted

    It's just that what was offered didn't really tell me how to do it, as in go here and change this setting. I "inherited" this application and I am used to VS2005 and using the inetpub directory.

    This is in VS2003. Hopefully our server team knows how it works.

    Saturday, May 24, 2008 8:36 PM
  • User-823196590 posted

    I'd really like to help you guys but I'm really having a hard time understanding what your issues are.  It's really simple to run content from whatever directory you like.  None of my servers use the default C:\inetpub\wwwroot location.

    lamp90 - why can't you create say "D:\webroot", right-click on the Default Web Site and bring up properties, click the Home Directory tab, make sure the radio button "A directory located on this computer" is selected, and enter this path into the "local path" text box?

    Tuesday, May 27, 2008 1:25 PM
  • User1222786384 posted

    With this application, if the Local Path in the Home Directory tab is a path: "D:\Folder\App", our redirect doesn't work. If the Local Path is a designator: "\App", our redirect does work. When we create the site and point to the folder, it doesn't add the designator.

     In order to change the VS publish location, I need the VS Developers group on the server. That usually means installing VS. I can't do that.

     
    Let me ask, for your sites on the D: drive, do you see an editable path in the Local Path field or is the field disabled with the site name?
     

    Tuesday, May 27, 2008 1:36 PM
  • User-823196590 posted

    With this application, if the Local Path in the Home Directory tab is a path: "D:\Folder\App", our redirect doesn't work. If the Local Path is a designator: "\App", our redirect does work. When we create the site and point to the folder, it doesn't add the designator.
    What do you mean by "redirect"?  How are you doing that exactly?  FWIW the local path text box expects a fully qualified local drive path.

    In order to change the VS publish location, I need the VS Developers group on the server. That usually means installing VS. I can't do that.
    Not sure what you mean by that.  You can always manually create groups.

    Let me ask, for your sites on the D: drive, do you see an editable path in the Local Path field or is the field disabled with the site name?
    Yes, it is all editable.  Are you accessing with an account that has local admin rights?

    Just re-reading your OP - what URL do you want to go to for this application? 

    Tuesday, May 27, 2008 2:12 PM
  • User1222786384 posted

    TMhen I guess I'm not doing something. As I said, we have three instances of the website. One instance the local path is disabled and displays "\Development". This site redirects to our authentication website. The other two local path instances are not disabled and display "D:\Folder\App". These do not redirect to our authentication site. When new users access the site they don't have a cookie and are redirected. That mechanism is not in our code.

    They are all created the same way, so if I can figure why one works, I  can apply that to the other instances. 

     

    Yes I am an Admin on the box. 

    Tuesday, May 27, 2008 2:22 PM
  • User-823196590 posted

    One instance the local path is disabled and displays "\Development".
    Very strange.  I have no idea how that can even be setup like that.

    Can you just delete this "bad" site and create a new one with the correct path/settings?

    Tuesday, May 27, 2008 3:40 PM
  • User1222786384 posted

    WM hen I create a website with VS 2003, it creates it in INETPUB and the  Local Path is disabled and displays "\MergerTools". All websites installed in INETPUB have the same behavior.

     

    When I create the website on the D: drive, it doesn't disable the Local Path field. I am working with our OS team now, and they have to have the answers. 

     

    I actually tried manually creating the VS Dev group and it still didn't work.

     

    But thanks for your help. 

    Tuesday, May 27, 2008 4:21 PM
  • User-823196590 posted

    You can't use VS to create the site - this must be done first via the IIS MMC.  Then use VS to connect to the site.

    Tuesday, May 27, 2008 4:42 PM
  • User1238244415 posted

    I had the same curiosity of changing the root to another drive.  It is easy and could be done either after you install IIS.  Simply, stop the Default website from the IIS manager, move inetpub folder to the drive of your choice, then change the path to where you want IIS to look for websites.  This is done by right clicking on default website in IIS manager and change all paths you find there to your designated folder/drive. 

    Here is a link from Microsoft on this process.

    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/a59a2665-9078-43ef-8b5a-5bf9bcacc95e.mspx?mfr=true

    Enjoy.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, January 10, 2010 2:25 PM
  • User797226040 posted

    Thanks for your info.  It is really useful.

    This is the response I was looking for almost two years ago.

    I wish all that contribute to this post bother to read and understand the post before replying to it and just exhibit their self-centered need to rake up as many posts as possible.  There ought to be a tool to rate posts as helpful or not, so legitimate answers may be sorted out from the trash that others want to pass as a reply.

     

    • Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
    Sunday, January 10, 2010 6:51 PM
  • User-823196590 posted

    Sorry I wasn't able to help you, but that's pretty much the same thing I told you way back when ... I guess I wasn't clear enough.

    Monday, January 11, 2010 9:52 AM
  • User2143736027 posted
    I'm surprised nobody mentioned using an answer file to do the IIS installation. 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\

    Regards,

    Jose
    Friday, November 19, 2010 10:21 PM
  • User797226040 posted

    Thanks, José.

    I have not had a chance to look at your link yet, but what we wanted to do was to move the whole IIS server root to another drive, not just individual service folders, like WWW.  This is what your answer file seems to do, rather than move the whole folder c:\iispub.

    Will look it up at some point and update this reply accordingly, but thanks anyway.

     

    Sunday, November 21, 2010 3:15 PM
  • User450204129 posted

    I just had to do this on some of my smtp servers and thought I would share how I did it.

    xcopy c:\inetpub d:\inetpub /s /e /v /h /k /o /x
    pause
    cscript.exe c:\inetpub\adminscripts\adsutil.vbs set smtpsvc/1/dropdirectory D:\Inetpub\mailroot\drop
    cscript.exe c:\inetpub\adminscripts\adsutil.vbs set smtpsvc/1/badmaildirectory D:\Inetpub\mailroot\badmail
    cscript.exe c:\inetpub\adminscripts\adsutil.vbs set smtpsvc/1/pickupdirectory D:\Inetpub\mailroot\pickup
    cscript.exe c:\inetpub\adminscripts\adsutil.vbs set smtpsvc/1/queuedirectory D:\Inetpub\mailroot\queue
    pause
    iisreset 

     

    Friday, September 21, 2012 12:58 PM
  • User-135304899 posted

    I realize the original post goes way back in time.  However, now that I'm being forced to switch from Windows Live Mesh to SkyDrive, I'm wondering if I can set things so that inetpub/wwwroot is in my local skydrive folder,   In other words, can I go into the IIS console and set %SystemDrive%\inetpub\wwwroot to be %SystemDrive%\skydrive\inetpub\wwwroot?

    Thanks,

    bberkov

    Sunday, February 3, 2013 1:55 PM
  • User-260263781 posted

    Recent article from MS re not supporting changing root directories - you can change the physical location of your ftp file or website file but should apparently never change the root directory of the installation system http://support.microsoft.com/kb/2752331

    Wednesday, April 10, 2013 4:17 PM