Module 7: Nginx Web Project
Welcome to the capstone project! In this module, you'll apply everything you've learned to set up a real web server using Nginx. This hands-on project will demonstrate your Linux skills and prepare you for web development tasks.
What You'll Learn in This Module
- Installing and configuring Nginx web server
- Creating and managing website files
- Understanding web server directory structure
- Starting, stopping, and managing services
- Troubleshooting common web server issues
Lesson 7.1
Nginx Installation
Lesson 7.2
Website Configuration
Lesson 7.3
Creating Your Website
Lesson 7.4
Project Exercises
Module Objectives
By the end of this module, you will be able to:
- Install Nginx web server using package management
- Create a basic 3-page website
- Configure Nginx to serve your website
- Start, stop, and restart web services
- Test your website locally
- Troubleshoot common web server issues
Why This Project Matters
This capstone project is important because:
- Integration: Combines skills from all previous modules
- Practical: Real-world web development scenario
- Confidence: Demonstrates your Linux competency
- Foundation: Prepares you for web development work
Project Overview
You'll create a simple 3-page website and serve it using Nginx:
Website Structure
Skills You'll Use
- Filesystem Navigation: Create and organize website files
- File Permissions: Set correct permissions for web content
- Command Line: Use terminal commands for setup
- Package Management: Install Nginx
- Service Management: Start and stop web server
What is Nginx?
Nginx (pronounced "engine-x") is a high-performance web server:
- Web Server: Serves web pages to browsers
- Reverse Proxy: Distributes requests to other servers
- Load Balancer: Spreads traffic across multiple servers
- High Performance: Handles many concurrent connections
- Lightweight: Uses fewer resources than alternatives
Project Workflow
Here's the step-by-step process you'll follow:
- Install Nginx: Use APT to install the web server
- Create Directory: Make a folder for your website
- Create Pages: Build HTML pages with content
- Add Styles: Create CSS for visual styling
- Configure Nginx: Set up the server to serve your site
- Start Server: Launch the web service
- Test Locally: View your website in your browser
- Troubleshoot: Fix any issues that arise
Prerequisites
Before starting this project, you should be comfortable with:
- Basic command-line operations (cd, ls, mkdir, etc.)
- File permissions and ownership
- Installing software with APT
- Text editing (using nano or another editor)
- Basic HTML (helpful but not required)
Getting Started
Ready to build your first web server? Start with installing Nginx and setting up the basic configuration.
Quick Terms to Know
Here are some terms we'll be using throughout this module:
- Web Server: Software that serves web pages
- Document Root: Directory where website files are stored
- Service: Background program that runs continuously
- Port: Network endpoint for web traffic (usually 80)
- Localhost: Your own computer (127.0.0.1)
Success Criteria
After completing this module, you'll have successfully:
- Installed and configured a web server
- Created a multi-page website
- Managed files and permissions
- Started and stopped system services
- Tested your work in a web browser
- Gained confidence in your Linux skills
Linux 101