In this article, we will go step by step to configure IIS Server on Windows Server 2012 R2 Datacenter to host Web page on Microsoft Azure using the management portal.

Azure Virtual Machines lets you deploy a wide range of computing solutions in an agile way. Deploy a virtual machine nearly instantly and pay by the minute. Scale from 1 to thousands of virtual machine instances. Built-in virtual networking and load balancing available.


Prerequisites


What will we learn?

  • Create Windows Server 2012 R2 Virtual Machine
  • Configure IIS Server
  • Host Web page on Azure Virtual Machine

Create Virtual Machine

Steps To Create A Virtual Machine

Step 1: Navigate to Azure Classic Portal & sing in using Azure Subscription credentials

Step 2: Select “Virtual Machine” option & click on “CREATE A VIRTUAL MACHINE” (if no VM available)

New -> Compute -> Virtual Machine -> Quick Create -> enter vm details




Enter VM details like DNS Name, Image, Size, Username & Password, Region



Wait for few minutes to configure all VM options.



Step 3:
Select VM & click on “Connect” option



One .rdp file will download




Click on Connect button



Enter VM Username & Password

Certificate windows will open & click on Yes button.



Windows Server 2012 R2 Datacenter ready




The IIS Server

Configure IIS Server

Start Server Manager



Select “Add roles and features” option







Choose first option “Role-based or feature-based installation






In Server Roles please add “Application Server” & Web Server(IIS)


















Choose IIS 6 options

Wait for Installation

Close the window



Create the Test Page


Open notepad & add below codes:

<html>
<title>
Microsoft Azure
</title>
<body>
<h1>Azure VM - Windows Server 2012 </h1>
</body>
</html>

Save it inside the wwwroot folder

C:\inetpub\wwwroot

C:\inetpub\wwwroot\index.html

Change Save as type to “All Files

Now again open Management Portal & select VM’s endpoints tab

Click on ADD button



Choose “HTTP” from the drop-down menu



Now run the DNS name in another browser or in another tab





Congratulations you have successfully configured IIS on Microsoft Azure!!!