Search code examples
iislocalhost

change iis localhost from C: to D:


i am using php in iis in our windows R2 server, the default localhost path is C:\inetpub\wwwroot and i want to change it to D for the reason that C might be full. Thanks for the help.


Solution

  • Look here for IIS6:

    To change the home directory of a Web site using IIS Manager

    1. In IIS Manager, expand the local computer, expand the Web Sites directory, right-click the Web site you wish to change, and click Stop.

    2. Use Windows Explorer, to rename the LocalDrive:\Inetpub\Wwwroot directory to the name of your choice. Alternatively, you can copy the entire \Wwwroot directory tree to a new location.

    3. In IIS Manager, right-click your Web site, and click Properties.

    4. Click the Home Directory tab, and under The content for this resource should come from, click A directory located on this computer, A share located on another computer, or A redirection to a URL, depending on where your home directory is located.

    5. In the Local path box, type the path name, share name, or URL of your directory.

    Note If you select a directory on a network share, you might need to enter a user name and password to access the resource. IUSR_computername is the default account used if another account is not specified. If you use an account with administration credentials on the server, clients can gain access to server operations. This seriously jeopardizes the security of your network. For more information on security user rights see, "Security Best Practices" in Help and Support Center for Windows Server 2003.

    1. In IIS Manager, expand the Web Sites folder, right-click the Web site you just changed, and click Start.