Capstone Project 1 — Build a Secure Linux Web Server¶
In this capstone project, you'll build a production-ready secure Linux web server from scratch. Rather than simply installing a web server, you'll configure networking, users, SSH security, firewalls, web services, TLS, monitoring, logging, backups, and system hardening. This project combines everything learned throughout the Linux Mastery course and closely resembles the tasks performed by Linux System Administrators, DevOps Engineers, Cloud Engineers, and Site Reliability Engineers (SREs) in production environments.
Project Overview¶
Objective¶
Build a secure Linux web server suitable for hosting production web applications.
Skills Covered¶
- Linux installation
- User management
- File permissions
- SSH Hardening
- Firewall configuration
- Web server installation
- HTTPS configuration
- Process management
- Systemd
- Monitoring
- Logging
- Backup
- Security hardening
- Performance tuning
- Production validation
Estimated Time¶
6–8 Hours
Difficulty¶
Beginner → Advanced
Project Architecture¶
Internet
│
│
HTTPS (443)
│
+----------------+
| Firewall |
+----------------+
│
│
+----------------+
| Ubuntu Server |
+----------------+
│
┌───────┴────────┐
│ │
SSH (22) Nginx (443)
│ │
└───────┬────────┘
│
Static Website
Learning Outcomes¶
By completing this project, you'll be able to:
- Build a secure Linux server
- Deploy a production-ready web server
- Secure remote administration
- Configure HTTPS
- Protect services with a firewall
- Monitor Linux servers
- Configure backups
- Validate production readiness
Project Requirements¶
Hardware¶
Minimum:
- 2 vCPU
- 2 GB RAM
- 20 GB Disk
Recommended:
- 2–4 vCPU
- 4 GB RAM
- 40 GB SSD
Operating System¶
Choose one:
- Ubuntu Server 24.04 LTS
- Ubuntu Server 22.04 LTS
- Rocky Linux 9
- AlmaLinux 9
This project uses Ubuntu Server.
Software Stack¶
- Ubuntu Linux
- OpenSSH Server
- Nginx
- UFW Firewall
- Fail2Ban
- Certbot (Let's Encrypt)
- rsync
- logrotate
Project Tasks¶
| Phase | Task |
|---|---|
| 1 | Install Linux |
| 2 | Configure Networking |
| 3 | Configure Users |
| 4 | Secure SSH |
| 5 | Configure Firewall |
| 6 | Install Nginx |
| 7 | Deploy Website |
| 8 | Configure HTTPS |
| 9 | Configure Logging |
| 10 | Configure Monitoring |
| 11 | Configure Backup |
| 12 | Harden Server |
| 13 | Production Validation |
Phase 1 — Install Linux¶
Install Ubuntu Server.
Verify installation.
Update packages.
Phase 2 — Configure Networking¶
Display interfaces.
Display routes.
Test connectivity.
Configure hostname.
Verify DNS.
Phase 3 — Configure Users¶
Create administrator.
Grant sudo.
Verify.
Disable direct root SSH login.
Phase 4 — Secure SSH¶
Edit configuration.
Recommended settings:
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
X11Forwarding no
MaxAuthTries 3
Restart SSH.
Phase 5 — Configure Firewall¶
Install UFW.
Allow SSH.
Allow HTTPS.
Allow HTTP.
Enable firewall.
Verify.
Phase 6 — Install Nginx¶
Install.
Start service.
Verify.
Test.
Phase 7 — Deploy Website¶
Example page.
Copy.
Verify.
Phase 8 — Configure HTTPS¶
Install.
Obtain certificate.
Verify.
Renewal test.
Phase 9 — Configure Logging¶
View logs.
Access logs.
Error logs.
Verify log rotation.
Phase 10 — Configure Monitoring¶
CPU.
Memory.
Disk.
Processes.
Services.
Phase 11 — Configure Backup¶
Create backup.
Synchronize.
Verify.
Phase 12 — Harden Server¶
Install Fail2Ban.
Start.
Verify.
Review listening ports.
Remove unnecessary packages.
Apply updates.
Phase 13 — Production Validation¶
Validate:
SSH
Firewall
HTTPS
Nginx
Logs
Backup
Verify archive exists.
Monitoring
Review CPU, memory, storage.
Final Project Checklist¶
| Item | Status |
|---|---|
| Linux Installed | ☐ |
| Updates Applied | ☐ |
| Hostname Configured | ☐ |
| Admin User Created | ☐ |
| SSH Hardened | ☐ |
| Firewall Enabled | ☐ |
| Nginx Installed | ☐ |
| Website Deployed | ☐ |
| HTTPS Enabled | ☐ |
| Logging Verified | ☐ |
| Monitoring Configured | ☐ |
| Backup Created | ☐ |
| Fail2Ban Enabled | ☐ |
| Production Validation Completed | ☐ |
Project Deliverables¶
At the end of this project, you should have:
- A secure Ubuntu Server
- A hardened SSH configuration
- A firewall protecting the server
- An Nginx web server serving a website
- HTTPS configured with a valid certificate
- Monitoring and logging in place
- Backup procedures documented
- A production-ready Linux web server
Challenge Tasks¶
Complete these additional tasks to extend the project:
- Configure automatic security updates.
- Create a custom Nginx virtual host.
- Host two websites using different domain names.
- Configure HTTP-to-HTTPS redirection.
- Enable Nginx rate limiting.
- Configure custom error pages (404 and 500).
- Add system resource monitoring using Prometheus Node Exporter.
- Configure automatic daily website backups using
cron. - Create a Bash script to verify web server health.
- Harden the server using CIS Benchmark recommendations.
Skills Demonstrated¶
After completing this capstone project, you will have demonstrated proficiency in:
- Linux System Administration
- Server Hardening
- User and Permission Management
- SSH Security
- Firewall Configuration
- Web Server Administration
- TLS/HTTPS Configuration
- Monitoring and Logging
- Backup and Recovery
- Production Validation
- Security Best Practices
- Operational Excellence
Congratulations!¶
You have successfully built a production-ready Secure Linux Web Server.
This project closely mirrors the work performed by Linux Administrators, DevOps Engineers, Cloud Engineers, and Site Reliability Engineers in enterprise production environments.
You have applied concepts from nearly every module of the Linux Mastery course, transforming theoretical knowledge into practical, real-world experience.
What's Next?¶
Capstone Project 2 — Configure a Bastion Host
You'll learn how to:
- Build a secure jump server
- Restrict SSH access
- Configure key-based authentication
- Implement network access controls
- Enable centralized logging
- Audit administrator access
- Protect production infrastructure
By the end of the project, you'll have a production-ready Bastion Host that securely manages administrative access to Linux servers across enterprise environments.