Wednesday, October 19, 2016

IIS: Internet Information Services

IIS: a flexible, secure and manageable web server, it comes with Windows and must be enabled rather than installed.

Part 1. Enable IIS

In the start menu type Control Panel to open the panel, go to Programs>Programs and Features, the window is displayed in Figure 5.1, on the left hand side of the window click "Turn Windows features on or off"
Figure 5.1 Programs and Features section of Control Panel
After clicking on "Turn Windows features on or off" a window similar to Figure 5.2 should appear.
Figure 5.2 Windows Features pane as selected from the control panel
Scroll to Internet Information Services(IIS) and click the box, you will notice it is filled with a square rather than a check mark, this means not all files in the folder will be installed. When expanded we see FTP Server will not be installed, for the purpose of this tutorial that is fine. Ensure Web Management Tools and World Wide Web Services are marked off as in Figure 5.3 and then press "OK"

Figure 5.3 Check off IIS to enable feature
If it was successfully enabled it should now appear in your Programs & Features list as is seen in Figure 5.4.
Figure 5.4 IIS successfully enabled

Part 2. Create two websites using IIS

Step 1. Open the IIS Manager

Open the start menu type "iis" and press enter. This will open the Internet Information Services Manager, your screen should look similar to Figure 5.5. You'll notice a list of connections on the left hand side, expand Sites, you will likely only see Default Web Site, we will be creating helloWorld and Second IIS Website in this tutorial.
Figure 5.5  Opening IIS Manager

Step 2. Add a website

Right-click on "Sites" and click "Add a website". You should see a screen similar to Figure 5.6

The site name will be displayed in the IIS manager and so you can name it what you would like, you'll notice for binding I have assigned it to all ip addresses on port 80. Now we must select the physical path. When IIS was installed a folder named "inetpub" was put on the root of the C: drive. Navigate to C:\inetpub\wwwroot\ and create a folder called helloWorld. Returning to the IIS Manager Add Website window paste this path into the "Physical path" field or navigate to it with the button beside the field. Add the host name "helloworld.com". Click "OK" when you are finished.

Note: Because we have checked off "Start Website Immediately" we do not need to worry about starting the servers later.
Figure 5.6 Complete the following information to add a website

Repeat this step once more except creating a folder called secondIIS rather than helloWorld in  C:\inetpub\wwwroot\ and change the port to port 8080 rather than port 80 so we can have both running at the same time. The new host name will be secondiiswebsite.com.

Step 3. Change permissions in C:\inetpub\wwwroot

Navigate to C:\inetpub\wwwroot and right click within the window, go to Properties and then click the Security tab and hit the "Edit" button.In Group or user names select Users and check the Allow box under Full Control, apply changes and Ok your way back to the folder.

Step 4. Create distinct index pages

Create a distinct index page in each of the created folders (helloWorld and secondIIS). We should now be able to access each page by opening up a web browser and typing the the host names.




No comments:

Post a Comment