This article discuss about the IIS server secure installation.
First, step to secure your IIS web server installation default folder, to change the path from C drive to D drive or any other drive letter.
The Inetpub folder is the default location of your web hosting content, IIS logs and so on. Its good practice to move the Inetpub folder from the default location “C:\> Inetpub” to the different location /partition. The folder “Inetpub” can be move after completed the IIS installation.
Here is the script called iisinetpubmove.bat to do the same
IIS Installation Steps:-
Go to Server Manager to add the IIS server Role.
Then Click on Roles.
Then click on Add Roles to get the next wizard to select IIS server roles.
This Wizard will show you some information about what you need to verify before continue the installation. So simply click on next button to continue.
Select the roles which you want to install like Web Server IIS and any others.
This wizard will give you the Introduction about Web Server IIS.So simply you need to click on next button.
Role Services wizard will come up to select the IIS services according to your requirement. Here I have selected ASP.Net service for my web server IIS. So simply click on Add Required Role Services.
This wizard will confirm about the installation of your selection that what you roles and services you have selected. Therefore, you need to click on Install button.
After that, Installation result wizard will pop-up, which will show you about the Roles, role services, or features were installed successfully. So simply you need to close this wizard.
You can see IIS server has been installed in your machine C Drive. You can also access IIS server using the following command “inetmgr” or simple go to Administrative tools.
Now After IIS installation you can move your inetpub folder from C drive to D drive or any other drive letter.This is an important to secure your web server installation directory. Here is the link https://gallery.technet.microsoft.com/scriptcenter/Script-to-move-the-IIS-f1fb62a5 from where you can download the script/batch file. After download the batch file you need to open command line runas Administrator and then run this batch file like “iisinetpubmove.bat”. Below snapshot shows the same.
This wizard shows the command result which we have executed using batch file.
After that, you can see that one folder is created called “Inetpub” in your D drive.