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.
Installing IIS Features on Windows 7
The following are the steps to install IIS including HTTP activation in VM Server
- On the Start menu, choose Control Panel, and then choose Programs.
- Under Programs and Features, choose Turn Windows features on or off.
- In the Windows features list, expand Internet Information Services, and then expand World Wide Web Services.
- Expand Application Development Features, and select the following features:
- .NET Extensibility
- ISAPI Extensions
- ISAPI Filters
- Expand Security, and then select the following features:
- Request Filtering
- Windows Authentication
- Expand Common HTTP Features, and then select the Static Content feature.
- 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.
- Choose the OK button to complete the installation.
- In the Windows features list, expand Microsoft .NET Framework, and then select Windows Communication Foundation HTTP Activation.
- 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 VM
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.
After creating new ‘Network Security Group’ you need to create an Inbound Rule.
Choose Inbound Security Rules from Settings and fill new port value as showed below:
Choose Protocol TCP and enter Destination Port as 80 and Save
Now you have created the HTTP default port 80 allowing to VM as inbound rule.
Create a WebSite under the Default domain
Create a new Site under Default:
The Websites created under Default Website will use the Port 80.
How to create new website under different Port in IIS?
Create a new site as showed below which use Port 81
Open a Port in Firewall
Open Windows Firewall and add a new InBound Rule to allow port 81
Next Open an Inbound Rule in Azure Management portal
Select the VM from Azure Management Portal and select Network Security Group as showed below:
Add an In-Bound Rule to allow the communication to Port 81 with high priority than the one you set for port 80 before