LEMP Stack

1. Develop PHP Contact Form on LEMP Stack

🎯 Goal

Learn to manually install and configure a LEMP stack (Linux, Nginx, MySQL, PHP) on Ubuntu and create a simple PHP contact form application with database storage.

📋 Prerequisites

Before beginning this tutorial, you should:

  • Have an Ubuntu 24.04 VM running on Azure
  • Have SSH access to your VM
  • Understand basic Linux command line operations
  • Be familiar with basic HTML and PHP concepts

📚 Learning Objectives

By the end of this tutorial, you will:

»

2. Security Hardening for LEMP Stack Applications

🎯 Goal

Learn essential security practices to harden your LEMP stack application, transforming the basic educational setup into a more production-ready deployment with proper security measures.

📋 Prerequisites

Before beginning this tutorial, you should:

  • Have completed Tutorial 1: Manual LEMP Stack Installation
  • Have a working LEMP stack with the contact form application
  • Understand basic Linux system administration
  • Be familiar with web application security concepts

📚 Learning Objectives

By the end of this tutorial, you will:

»

3. Installing and Configuring phpMyAdmin for MySQL Admin

🎯 Goal

Install and configure phpMyAdmin to provide a web-based graphical interface for managing your MySQL database, making it easier to view data, run queries, and perform database administration tasks.

📋 Prerequisites

Before beginning this tutorial, you should:

  • Have completed Tutorial 1: Manual LEMP Stack Installation
  • Have a working MySQL database with the contact form application
  • Understand basic database concepts (tables, records, queries)
  • Have SSH access to your Ubuntu VM

📚 Learning Objectives

By the end of this tutorial, you will:

»

4. SSL/TLS Configuration for Nginx

🎯 Goal

Configure SSL/TLS encryption for your LEMP stack application using Nginx SSL offloading, providing secure HTTPS connections for your web application and phpMyAdmin interface.

📋 Prerequisites

Before beginning this tutorial, you should:

  • Have completed Tutorial 1: Manual LEMP Stack Installation
  • Have a working Nginx web server serving your application
  • Have SSH access to your Ubuntu VM
  • Understand basic concepts of SSL/TLS encryption
  • Recommended: Configure your VM with a static public IP address (see note below)
  • For Part 2 (Let’s Encrypt): Own a registered domain name pointing to your VM’s public IP

⚠️ Important: Static IP Recommendation

»

5. Setting Up a Free Domain with DuckDNS

🎯 Goal

Set up a free subdomain using DuckDNS that points to your Azure VM, enabling you to use Let’s Encrypt SSL certificates and access your application with a memorable domain name instead of an IP address.

📋 Prerequisites

Before beginning this tutorial, you should:

  • Have an Azure VM running with a static public IP address
  • Know your VM’s public IP address
  • Have an email address for account registration
  • Understand basic DNS concepts (A records, domain resolution)

📚 Learning Objectives

By the end of this tutorial, you will:

»