loading...

Microsoft IIS 10.0 – Configuring virtual directories in IIS 10.0

How to Install Kubernetes cluster on Ubuntu 18.04

In this recipe, we are going to configure the virtual directory step by step. We will modify the default document settings of the virtual directory and permissions of the physical directory. We’ll also set up the basic and advanced settings of the virtual directory.

Getting ready

To step through this recipe, you will need a running IIS 10.0 instance with a virtual directory created. You should also have administrative privilege.

How to do it…

  1. Open the Server Manager on Windows Server 2016. Click on the Tools menu and open IIS Manager.
  2. Expand the IIS server ( WIN2016IIS). We get the listed Application pools and Sites folders.

 

 

  1. Expand the Sites folder under the Connections panel, click on mysite.com, and you will see the Actions panel in the top right corner, under which you will see the Edit Permissions… option for VirtualDirectory.
  2. Click on Edit Permissions…, and you will get the properties of VirtualDirectory. These are the physical folder properties. Go to the Security tab and click on Edit.
  3. Find the IUSR user and IIS_IUSRS group and add them to the Security tab. Click on the default permission boxes for Read & e xecute, List folder contents, and Read. These settings are used to access the website through a web user or website application; IIS_IUSRS and IUSR are used for the application pool’s internal authentication and communication.
  1. IIS_IUSRS is the group for IIS worker process accounts. This means the identity that the application pool itself runs under. IUSR is the anonymous user identity.

 

 

  1. Click on the OK button to finish. Next, you have to click on the Basic Settings… of the virtual directory, available in the Actions pane:
  1. In Basic Settings…, you have the option to change the physical path of virtualdiretory; we can set the Connect as… settings as shown in the screenshot, but keep them at the default values.
  1. We can select a specific user to access this directory or any one of the IIS internal application pool default IUSR users. We have selected the default option, Application user, for the test connection.
  1. Click on the OK button, go to Basic Settings…, and click on the Test Settings button, as shown in the screenshot. You will get this option by selecting VirtualDirectory, which was created in the previous recipe. Go to the Actions panel on the right-hand side, and click on Basic Settings…. A property edit window appears for editing the virtual directory. The last option you will find is Test Setting, which will open the following window. Under Test Connection, you will have two Test results, Authentication and Authorization, which are responsible for validating the application pool and the physical path of the virtual directory.
  1. The Test Connection window shows that the website’s application pool authentication is the pass-through authentication (defaultAppPool) application pool. The application pool authenticates through the default IIS user, IUSR, or the IIS_IUSRS group. We did not set any authorization, so it’s showing us Cannot verify access to path. Click on the Close button, and move to Advanced Settings….
  1. Click on Advanced Settings… in the Actions panel, as shown here:
  1. Here, Advanced Settings… is used to change the Physical Path, Physical Path Credentials, and Physical Path Credentials Logon type of virtualdirectory.
  2. Next, we have to apply the settings in Default Document, which will help us access the Demo.html page we added in the previous recipe.
  3. Expand mysite.com from the Sites folder and select virtualdirectory. You will see the Default Document option in the middle pane.

 

 

  1. Open the Default Document and add the entry demo.html; bring this entry to the top of the list:

How it works…

In this recipe, we made changes to the physical folder permissions; we searched for the IIS user and IIS user group and assigned permissions to the virtual directory folder in steps 1 to 5. In steps 6 to 10, we reviewed the basic settings of the virtual directory in detail. In steps 11 and 12, we discussed advanced settings, and in steps 13 to 15, we added the default document.

Comments are closed.

loading...