Posted by Anuraj on Monday, December 19, 2016
This post is about configuring and running a webserver in Azure Virtual Machine. Azure Virtual Machine is one of IaaS (Infrastructure as a service) offering from Microsoft Azure. Infrastructure as a service (IaaS) is an instant computing infrastructure, provisioned and managed over the Internet. Quickly scale up and down with demand and pay only for what you use.
Hope you’re already created a virtual machine, if not create a virtual machine, it is pretty straightforward.
I have already created an Azure Virtual Machine with Windows 7 OS. To configure it as webserver, first you need to install IIS, you can do it by Remote Desktop to the machine and install IIS from Programs and Features.
Once it completed, you need to add exception in firewall to allow incoming / out going traffic.
Now you have completed the configuration in Virtual Machine. Now you need to modify VM Settings in the Portal. Click on the Virtual Machine name from the all resources list. Select the Network Interfaces menu.
From the listed network interfaces, click on the network interface, which will open the Network Security Group.
Inside the Network Security Group settings, select the Inbound security rules option. You will see Remote Desktop rule there.
Click add, which will open Add Inbound Rule option.
Name is for identifying the rule, in this post I am using Web as my inbound rule name, Priority can be anything, rules processed based on priority. Lower the number, higher the priority. Source setting helps to allow traffic from specific IP Address, for web server it can be any. Service to configure the port. You can choose HTTP, which will configure Port number 80 and Protocol also will change to TCP. Action need to set as allow. Once you save this, you can see the rule in the list.
Please note that the same rule will apply to all the VMs using the same Netwrok Security Group, which means you can reuse it for all your Web servers for example, while most likely choosing a different one for all your SQL machines. You can now connect directly to your VM using port 80 and the public IP provided in its Dashboard.
Here is the screenshot of the same.
Happy Programming :)