Azure VM – Configure IIS and Expose

After setting up VM the next important thing needs to do is to Enable IIS in the Windows Server and provision it in Azure Portal to access it from anywhere.

This article will help you to achieve it.

Enable IIS in VM Server

The below screen shots will help you to configure IIS in VM Server.

1.png

2.png

 

3.png

4.png

5.png

6.png

7.png

8.png

9.png

10.png

11.png

12.png

13.png

Installing IIS Features on Windows 7

The following are the steps to install IIS including HTTP activation in VM Server

  1. On the Start menu, choose Control Panel, and then choose Programs.
  2. Under Programs and Features, choose Turn Windows features on or off.
  3. In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.
  4. Expand Application Development Features, and select the following features:
    • .NET Extensibility
    • ASP.NET
    • ISAPI Extensions
    • ISAPI Filters
  5. Expand Security, and then select the following features:
    • Request Filtering
    • Windows Authentication
  6. Expand Common HTTP Features, and then select the Static Content feature.
  7. To install Internet Information Service (IIS) Manager, under Internet Information Services, expand Web Management Tools, and then selectIIS Management Console.This step is optional. You use Internet Information Service IIS Manager to manage local and remote web servers and sites.
  8. Choose the OK button to complete the installation.
  9. In the Windows features list, expand Microsoft .NET Framework, and then select Windows Communication Foundation HTTP Activation.
  10. To verify that the web server has been installed correctly, start your browser, and then type http://localhost in the address.The default web site opens and should display an IIS 7 image. If the IIS 7 image does not appear, then verify that you have configured static content on IIS, as described in step

After configuring IIS in VM the next challenge would be to access the hosted sites in IIS from outside of VM.

Login to new Azure portal and choose VMNewVM

There are 2 options to create a new port either using an existing ‘Network Security Group’ and add an In-Bound Rule or create a new ‘Network Security Group’ and add new rule into it.

For creating a new rule choose Add +New option from portal as showed below.

NewResourceGroup.png

After creating new ‘Network Security Group’ you need to create an Inbound Rule.ResourcrGroup2.png

Choose Inbound Security Rules from Settings and fill new port value as showed below:

14.png

Choose  Protocol TCP and enter Destination Port as 80 and Save

15.png

Click Save.

16.png

Now you have created the HTTP default port 80 allowing to VM as inbound rule.

Create a WebSite under the Default domain

Open IIS

1.png

Create a new Site under Default:

The Websites created under Default Website will use the Port 80.

2.png

 

How to create new website under different Port in IIS?

Create a new site as showed below which use Port 81

4.png

5.png

Open a Port in Firewall

Open Windows Firewall and add a new InBound Rule to allow port 81

6.png

7.png

8.png

9.png

10.png

11.png

12.png

 

Next Open an Inbound Rule in Azure Management portal

Select the VM from Azure Management Portal and select Network Security Group as showed below:14.png

Add an In-Bound Rule to allow the communication to Port 81 with high priority than the one you set for port 80 before

13.png

Happy Programming

Advertisements
%d bloggers like this: