Skip to main content

Phase 3: Deploy Web Application

Objective

Deploy and serve a simple HTML application using Nginx on a Linux VM. This checkpoint demonstrates web server setup, static content delivery, systemd integration, and performance testing.


Implementation

Install Nginx

sudo apt update
sudo apt install nginx -y
  • Installs the Nginx web server package.
  • Nginx runs automatically after installation.

Create HTML Application

  • This file will be served as the default web page.

Create the file /var/www/html/index.html

<!DOCTYPE html>
<html>
<head>
  <title>Linux Masterclass App</title>
</head>
<body>
  <h1>Welcome to the Linux Masterclass!</h1>
  <p>This is a simple HTML app served by Nginx.</p>
</body>
</html>

Systemd Integration

  • Enable Nginx to start automatically on boot
sudo systemctl enable nginx
  • Verify Nginx is managed by systemd
systemctl status nginx

Test in Browser

  • Replace <public-ip> with the VM’s public IP address.
  • Access the application via:Code
http://<public-ip>

Traffic Simulation (Load Testing)

  • Sends 1000 requests with 50 concurrent connections.
  • Collects performance metrics such as requests per second and response times.
  • Use ApacheBench (ab) to simulate traffic
ab -n 1000 -c 50 http://<public-ip>/

Deliverable

  • Running HTML application accessible via the VM’s public IP.
  • Load test results showing Nginx’s performance under simulated traffic.

Checkpoint

Learners explain:

  • Why Nginx is suitable for serving static content:
    • Lightweight and efficient.
    • Optimized for handling concurrent connections.
    • Simple configuration for static files.
    • Low resource usage compared to heavier web servers.

Hackers Notebook

Deploying a simple HTML application with Nginx demonstrates core web server concepts:

  • Nginx is a reverse proxy and web server optimized for speed and concurrency.
  • Systemd integration ensures service reliability and automatic startup.
  • ApacheBench provides quantitative performance metrics, validating readiness for production workloads.
  • Serving static content highlights Nginx’s efficiency and scalability, making it a preferred choice for modern web applications.

This checkpoint integrates Linux administration, web server deployment, and performance testing - essential skills for DevOps and cloud engineers.


Tips, Tricks, Roadmaps, Resources, Networking, Motivation, Guidance, and Cool Stuff ♥

Updated on Dec 23, 2025