Book Image

Microsoft IIS 10.0 Cookbook

By : Ashraf Khan
5 (1)
Book Image

Microsoft IIS 10.0 Cookbook

5 (1)
By: Ashraf Khan

Overview of this book

This book will start with customizing your IIS 10 to various platforms/OS and tune it according to your business requirements. Moving on, we will focus on the functionalities of core fundamentals and perform practical scenarios in order to maximize the use of a reliable web server. Going further we will be covering topics like IIS 10 architecture, IIS modules,hosting web server platforms, virtual directories along with web site deployment, ports, enhanced security. We will also cover new features of IIS 10 like integration with Windows Server 2016 and Nano Server, HTTP/2, PowerShell 5 cmdlets etc . Towards the end, we will cover troubleshooting & diagnostic techniques of IIS 10. By the end of this book you will be well versed with maximizing the reliability of your webserver and will have immense knowledge in using IIS 10 effectively
Table of Contents (14 chapters)

Hosting static web page

In this recipe, we will host our simple HTML web page.

Getting ready

We need to create an HTML web page and have IIS 10.0 running. You will also require user administrator rights for hosting the site.

How to do it...

  1. Open Notepad and type something, like the text shown in the following screenshot. You can write anything you want.
  2. Save the Notepad file on your desktop with the name of index.html.
  1. Next, you have to open IIS Manager, select the Default Web Site, and right-click on it:
  1. Click on the Explore option from the pop-up menu.
  2. It will open the Inetpub folder from the C:\inetpub\wwwroot default website folder location, where you will have kept your web application or website files. The wwwroot folder is your hosting directory.

  1. Copy index.html from the desktop and paste it in the C:\inetpub\wwwroot folder, as shown here:
  1. Select the Default Web Site, which is listed on the left-hand side of IIS Manager. You will get the Default Document module.
  2. Now you have to open the Default Document. There is already a list of filenames and extensions available. These names exist by default. If you want your custom filenames and extension to get listed there, you can add them to the Default Document and make sure you move the custom extension to the top of the default document settings.

  1. Click on Default Web Site. You will see the property page come up:
  1. Open the Default Document. You will find Default.htm, Default.asp, Index.html, and many names listed. Our filename is Index.html, and the default document already has the same name.

How it works...

Once we check the Default Document configuration and find the index.html name already listed, we have to open the web page, and the default home page will open. The Default Document setting is very helpful for launching your website as you will select it and you need to tell IIS Server what your home page is.