Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft IIS 10.0 Cookbook

You're reading from   Microsoft IIS 10.0 Cookbook Task-oriented recipes to manage your web server with ease

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher
ISBN-13 9781787126671
Length 410 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ashraf Khan Ashraf Khan
Author Profile Icon Ashraf Khan
Ashraf Khan
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Integrating IIS 10.0 with Windows Server 2016 FREE CHAPTER 2. Creating an Application Pool in IIS 10.0 3. Hosting Multiple Websites on IIS 10.0 4. Constructing Virtual Directories in IIS 10.0 5. Installing HTTP/2 on IIS 10.0 6. Getting Your Wildcard Host Up and Running 7. Deploying IIS 10.0 on Nano Server 8. Configuring IIS Administration with PowerShell Cmdlets 9. Enabling ASP.NET Core with IIS on Nano Server 10. Installing and Configuring SSL Websites 11. Extending IIS 10.0 to FTP 12. Securing Your Websites on IIS 10.0 13. Managing and Troubleshooting IIS 10.0

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.

You have been reading a chapter from
Microsoft IIS 10.0 Cookbook
Published in: Jun 2017
Publisher:
ISBN-13: 9781787126671
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime