How to setup a Web Server in an Azure Virtual Machine

This is part of our series: Supercharge your developing experience with Infrastructure assets in Azure. A developer has always sat a couple of layers behind production and we all have memories of “this only happens in production” scenarios. Having the opportunity to play around, deploy, and troubleshoot in real production environments has become a real tool in our arsenals thanks to Azure Infrastructure as a Service (IaaS). The following is a tutorial in how to quickly provision and setup a web server in an Azure Virtual Machine.

This tutorial assumes that you are familiar with the basic functions of provisioning machine in the Azure Management Console.

Under virtual machines click New

how-to-set-up-web-server-in-azure-virtual-machine2

provision a virtual machine

how-to-set-up-web-server-in-azure-virtual-machine3

Once the virtual machine has been provisioned, go to the endpoints tab in the azure management console.

image

Click on Add

image

This will launch  the endpoint add wizard, click on the forward button

image

Select HTTP from the dropdown menu and click the check mark button

image

repeat the process for HTTPS ( and FTP if you need FTP access)

image

This is how my list of endpoints looks like once I am done

image

To test, remote access to the machine by clicking on the Dashboard tab and click Connect.

image

After logging in -with the credentials specified when the server was provisioned- the dashboard will be shown, click on Add roles and features.

image

Click next in the prompts that come up until you get the the role selection screen. Select Web Server (IIS)

image

Click the next button, if you will be using FTP click on the FTP Server, leave the other default checks as they are,

image

Click next and Install to complete these step.

image

After the server finishing installing these components, notice the inetpub folder that has been created in the c: drive.

image

we can now enter our DNS entry  in a browser and see the default IIS page

image

lets make a quick change to this page

image

Add a simple html heading code:

image

save and refresh the browser you used to see the IIS default page, the word TEST will now be shown.

image

you now have a fully public functionally web server running in the cloud.

Using IaaS infrastructure assets in your development process provides a unique window to the hardware potential that the cloud has to offer while providing a venue to see your applications running in scenarios beyond your trusted laptop development machine.

Bill Young

Director of Technology at Equinix Professional Services for Cloud
From his first Compaq Presario 5528, Bill has been hooked on learning new technologies and pushing the boundaries of what's “possible.” His passion to understand how everything works has him constantly taking things apart and putting them back together.

Bill started his career as a developer and quickly became frustrated with the speed at which traditional infrastructure organizations move. With the emergence of cloud, infrastructure as code, and all things DevOps, he’s found a limitless information playground.

Bill specializes in migrating/creating enterprise-level data centers in the cloud, solving/optimizing performance-related problems, streamlining development operation efforts, creating custom applications, and wielding a PowerShell hammer.

Latest posts by Bill Young (see all)

About the Author

Bill Young

From his first Compaq Presario 5528, Bill has been hooked on learning new technologies and pushing the boundaries of what's “possible.” His passion to understand how everything works has him constantly taking things apart and putting them back together. Bill started his career as a developer and quickly became frustrated with the speed at which traditional infrastructure organizations move. With the emergence of cloud, infrastructure as code, and all things DevOps, he’s found a limitless information playground. Bill specializes in migrating/creating enterprise-level data centers in the cloud, solving/optimizing performance-related problems, streamlining development operation efforts, creating custom applications, and wielding a PowerShell hammer.

2 Comments

  1. Hello Bill,
    I have followed your post on Azure virtuala machines, IIS and Web Service Management and all is running. I can open my IIS default page and that works fine. I can remotely access my xxx.cloudapp.net site fine and it is live also. However, when I try to add a website it keeps saying page can’t be displayed. I’ve tried e verything. Heeeeeeeeeeeelp…!!Smile | :)

    Here is the error I get

    Error 1 Web deployment task failed. (Could not connect to the remote computer (“xxx.cloudapp.net”) using the specified process (“Web Management Service”) because the server did not respond. Make sure that the process (“Web Management Service”) is started on the remote computer. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_COULD_NOT_CONNECT_TO_REMOTESVC.) 0 0 InstrumentAcquisitionWebService

Leave a Reply

Your email address will not be published. Required fields are marked *