Kahibaro
Discord Login Register

Web Servers

Overview and Goals of This Chapter

In this chapter you will learn the core concepts and practical skills needed to deploy and manage web servers on Linux. The following sections go into detail in later chapters:

This chapter ties those pieces together, focusing on:

You are expected to already be comfortable with basic Linux administration, networking fundamentals, and systemd-based service management from earlier parts of the course.

What a Web Server Does (in Practice)

A web server’s primary role is to accept HTTP/HTTPS requests and return responses, usually:

Key responsibilities of a production web server:

Typical Web Server Architectures

Single-Server Architecture

All roles on one machine:

Pros:

Cons:

Use case: internal apps, low-traffic sites, early development.

Two-Tier: Web + Database

Split web/application from database:

Benefits:

Use case: most small to medium production deployments.

Three-Tier / Multi-Tier

A common arrangement:

Web servers often act as:

Used for:

Static Content vs Dynamic Applications

Many deployments separate:

The web server typically:

Choosing a Web Server: Apache vs Nginx (and Others)

Details of Apache and Nginx configuration are covered in their own chapters. Here we focus on when and why to use them.

Apache HTTP Server

Characteristics:

Strengths:

Consider Apache when:

Nginx

Characteristics:

Strengths:

Consider Nginx when:

Using Apache and Nginx Together

A common pattern:

Nginx can:

Apache continues to provide:

Core Concepts for All Web Servers

HTTP and HTTPS Basics

Web servers implement HTTP/1.1, and often HTTP/2 and/or HTTP/3.

At a high level:

As an admin you will often:

HTTPS adds TLS:

Ports and Binding

A web server typically:

Common tasks:

Static vs Dynamic Content Handling

For static content:

For dynamic content:

You decide, per URL path or virtual host, whether a request:

Virtual Hosting and Multi-Site Architectures

The Virtual hosts chapter will cover concrete configuration. Here we focus on concepts and scenarios.

Name-Based Virtual Hosting

Most common method:

Use cases:

Requirements:

IP-Based and Port-Based Virtual Hosts

IP-based:

Port-based:

Multi-Tenant Considerations

When hosting many customers / sites on the same server:

Reverse Proxies and Load Balancing

There is a separate Reverse proxy concepts chapter, but you should understand why web servers commonly act as reverse proxies.

Reverse Proxy Role

A web server acting as a reverse proxy:

Common functions:

Basic Load Balancing Patterns

With multiple upstreams, the web server can:

You will typically:

Path and Host-Based Routing

Reverse proxies often route based on:

This allows:

TLS/SSL and Certificates in Web Server Context

The SSL/HTTPS chapter covers in-depth configuration. Here we focus on what matters operationally.

Certificate Types

Common certificate forms:

As an admin, you need to:

Let’s Encrypt and Automation

In modern deployments, you will often:

Key operational point:

TLS Termination Strategies

You can:

Trade-offs:

Performance and Scalability Considerations

Apache/Nginx tuning specifics live in their respective chapters; this section covers general strategies.

Concurrency and Worker Models

Web servers handle many simultaneous clients. You will decide:

Tools to evaluate:

Static Asset Optimization

Web servers can:

Operational practice:

Caching Layers

You can use:

As an admin you must:

Horizontal Scaling

Scaling web servers typically means:

Key considerations:

Security Considerations for Web Servers

General system security is covered elsewhere; here is what’s specific to web services.

Attack Surface of Web Servers

Typical threats:

Your job at the web server layer:

Hardening Web Server Configuration

Common practices:

Integration with system security:

Request and Connection Limits

To mitigate abuse:

Web Application Firewalls (WAF)

Often deployed:

They provide:

You must:

Logging, Monitoring, and Troubleshooting

Access and Error Logs

Every serious deployment must:

You will typically:

Typical troubleshooting steps:

Key Metrics to Monitor

For web servers and their environment:

Use:

Common Problems and Their Symptoms

Your workflow:

  1. Observe symptoms from the client side.
  2. Check web server logs and metrics.
  3. Check upstream/application and database status.
  4. Adjust configuration or roll back recent changes.

Operational Best Practices

Configuration Management

For reliability and reproducibility:

Always:

Deployment Strategies

You’ll often coordinate:

Strategies:

Web server responsibilities in deployment:

Documentation and Runbooks

For production readiness:

Summary

By the end of this chapter you should:

The following chapters (Apache basics, Nginx basics, Virtual hosts, SSL/HTTPS, and Reverse proxy concepts) will build on these ideas with concrete, hands-on configuration examples and deeper dives into each topic.

Views: 31

Comments

Please login to add a comment.

Don't have an account? Register now!