So how do I do this?
Simply put:- Create your new IIS location
- Install SharePoint
- When given the option, choose to install to your new "inetpub" location.
- Move all your existing webs to new location (including SharePoint)
- Update IIS to recognize new webroot for SharePoint web and SharePoint Central Admin
So why was this so difficult that it required a blog post?
Well, if one were to follow the order of operations listed above, then all goes well. Alas, I was unaware of the order of operations, and instead had done something similar to the following:
- Install SharePoint
- Created my new IIS location
- Attempted to move SharePoint to new IIS location
- Angered the SharePoint gods (unknowingly)
- Successfully Browsed SharePoint site - and rejoiced!
- Discovered my custom SharePoint design is now broken
- sobbed and repented
- Un-installed SharePoint
- Re-Installed SharePoint, and took notice of the handy-dandy tab to choose my installation location
- Updated IIS to recognize the new location of my webroots
- Broke SharePoint Central Admin
- Freaked out
- Updated references on MasterPage to recognize SharePoint location
- Fixed Central Admin
Installing SharePoint to a non-default location.
As mentioned above, this is actually, insanely simple. During installation, choose the File Location tab when choosing Complete or Stand-alone installation types. Choose your drive location and continue. This will NOT install to a different IIS directory off of your "C" drive, this will just install certain application files in a separate directory.
Moving IIS to a new drive location
On your web server, create your new directory where you want to host IIS from. Then, download the MoveIIS7Root.zip file from Thomas Dehl's blog post: http://blogs.iis.net/thomad/archive/2008/02/10/moving-the-iis7-inetpub-directory-to-a-different-drive.aspx. Edit the bat file to indicate the location of you new IIS Root, and execute the statements.Moving SharePoint's webroot to the new IIS location
With IIS now on it's new location, you need to ensure that the IIS references to SharePoint's webroot are accurate. Open up the SharePoint PowerShell Admin tool and use the following commands (thank you to sbommana for the guidance on this - http://sbommana.wordpress.com/2011/05/11/move_inetpub_on_sharepoint_wfe/):#Create a web application object
#Example: $SPSite = new-object Microsoft.SharePoint.SPSite("http://intranet.foo.com")
$SPSite = new-object Microsoft.SharePoint.SPSite("URL")
$WebApp = $SPSite.WebApplication
#Change SPUrlZone if not in default zone
$IISSettings = $WebApp.IisSettings[[Microsoft.SharePoint.Administration.SPUrlZone]::Default]
#Point to your new directory
#Example: $IISSettings.Path = "E:\inetpub\wwwroot\wss\VirtualDirectories\<SiteID>"
$IISSettings.Path = "<Your IIS Path Here>\wss\VirtualDirectories\<SiteID>"
#Update Web Application
$WebApp.Update()
$SPSite.Dispose()
Restart IIS, ensure that your SharePoint web is responding. Then, try your SharePoint Central Admin site to ensure that it is responding. If it isn't, check your server event logs for clues. In most cases, you may find the item "Safe mode did not start successfully". This issue could be because of service permissions.. but chances are in this case, because you just performed open heart surgery on SharePoint. To resolve, unprovision and re-provision your central admin site by using the following commands using the command prompt (and dont forget to run as admin!):
psconfig.exe -cmd adminvs -unprovision
psconfig.exe -cmd adminvs -provision -port <port number>
No comments:
Post a Comment