Tutorials
1. Provision a Virtual Machine on Azure and Install an Nginx Web Server
Video
Introduction
This tutorial is designed for individuals with a basic understanding of cloud concepts and who are interested in learning how to set up a virtual machine (VM) on Azure and deploy an Nginx web server. We will go step-by-step through the process, emphasizing best practices and troubleshooting.
Method
- We will use the Azure web console to manually provision a VM running the Linux distribution Ubuntu as Operating System (OS)
- We will deploy an Nginx web server by using the Ubuntu package manager running cloud-init.
- We will use a locally installed terminal to access the server (GitBash on Windows)
Prerequisites
- An Azure account. If you don’t have one, sign up here.
- Basic knowledge of cloud computing and familiarity with command-line interfaces (CLI).
- For Windows users: GitBash or similar terminal (Mac and Linux users can use the pre-installed terminal)
Provision a Virtual Machine
Log into Azure Portal
»
2. Provision a Virtual Machine on Azure using an ARM template
Introduction
This tutorial is designed to give a basic understanding of cloud concepts to those who are interested in learning how to set up a virtual machine (VM) on Azure using an ARM template. We will go through the process step-by-step deploying an Ubuntu 22.04 LTS VM, creating a minimalistic solution that can be used as a foundation for further development.
Method
- We will use an ARM template to define and provision the Azure resources required for our VM, including network configurations and security settings.
- The ARM template will be launched using the Azure CLI, having a code-first approach to cloud infrastructure.
- Access to the deployed VM will be via password (in order to adhere to the minimalistic approach).
Prerequisites
- An Azure account. If you don’t have one, sign up here.
- Basic familiarity with JSON and the Azure Command-Line Interface (CLI).
- For Windows users: GitBash or similar terminal (Mac and Linux users can use the pre-installed terminal)
Provision a Virtual Machine Using ARM Template
Prepare Your ARM Template
»3. Install PHP and Create a Simple Form Handler
🎯 Goal
Install PHP on your Ubuntu VM and create a simple web application that processes HTML form submissions, demonstrating basic server-side processing with PHP.
📋 Prerequisites
Before beginning this exercise, you should:
- Have completed the previous VM creation exercises
- Have an Ubuntu VM running with Nginx installed
- Be able to SSH into your VM
- Understand basic HTML form structure
📚 Learning Objectives
By the end of this exercise, you will:
»4. Install the LEMP Stack on an Ubuntu VM Using Azure CLI
Overview
This tutorial explains how to install the LEMP stack (Linux, Nginx, MySQL, PHP) on an Ubuntu Virtual Machine (VM).
Step 1: Provision the Virtual Machine
Create a resource group:
az group create --name LempRG --location northeuropeProvision the Ubuntu VM:
az vm create \ --resource-group LempRG \ --name LempVM \ --image Ubuntu2204 \ --size Standard_B1s \ --admin-username azureuser \ --generate-ssh-keysOpen port 80 for HTTP traffic:
az vm open-port --resource-group LempRG --name LempVM --port 80Retreive the Public IP of the VM:
»
5. Securely Manage Servers Behind a Bastion Host
In this tutorial, you’ll learn how to copy files from your local laptop to a web server running in Azure.
We’ll cover two scenarios:
- Direct access (server has a public IP).
- Indirect access via a bastion host (server only has a private IP).
We’ll also use a staging folder (/tmp/app) on the server to keep things clean and make updates easier.
1. Local Project Setup
On your laptop, create a folder named app/ with three files:
6. Use A Reverse Proxy In Front of the App
Introduction
This tutorial is designed for developers and system administrators looking to configure Nginx as a reverse proxy in front of an application server on Azure. Both servers will reside within the same virtual network.
Prerequisites
- An active Azure account. Sign up here if you don’t have one.
- Familiarity with Azure portal, cloud networking, and SSH.
- Basic knowledge of Nginx.
In order to “set the table” so that we can verify that the reverse proxy works as expected, let’s create two VMs - one Application Server and one Reverse Proxy. These two servers should be connected to the same subnet in this example.
»