Apache with Mod Rewrite Training Course

Course Summary

This extended version of our Apache httpd Web Server Administration covers the details of installing and configuring Apache, adds a section on mod_rewrite, and more time for labs.

Students will learn the details of the httpd.conf configuration file, using .htaccess files, virtual hosts, MIME and file types, URL mapping, directory indexing, performance tuning, handlers, filters, server-side includes, managing scripts, security and Apache modules.

NEW This course also introduces students to URL manipulation through Apache's mod_rewrite module, and explores how mod_rewrite allows web applications to be search-engine friendly, user friendly (offer bookmarkable URLs), flexible to change, and safer from hackers.

 

Duration [top]

3 days.

Objectives [top]

Upon completion of this course, you will be able to:

  • Compile and install Apache on both Windows and UNIX-type environments
  • Explain the difference between Apache httpd/web server and Apache Software Foundation
  • Deploy, support, and troubleshoot applications on Apache
  • Navigate Apache's directory structure
  • Understand Apache configuration files: httpd.conf
  • Secure Apache and applications running on it
  • Set up Apache for SSL
  • Tune Apache's performance
  • Manipulate URLs through Apache's mod_rewrite module

Audience [top]

This course is for web server administrators who need to be able to install, configure, tune, and secure Apache httpd Web Server.

Prerequisites [top]

To get the most benefit from this course, you should be familiar with the basic principles of server/system administration.

Additionally, prior exposure to any of these concepts can be helpful:

  • Compilation of native programs (e.g. configuring and compiling C/C++ applications on UNIX/Linux)
  • HTTP protocol (i.e., the stateless nature of HTTP, the need for sessions, HTTP methods, SSL, etc.)

Please note that all these concepts are covered in the class.

Outline [top]

Introduction to Apache

  • History of Apache
  • Overview of Apache Software Foundation
  • Downloading Apache
  • Installing Apache on Windows using a pre-built binary
  • Installing Apache on Unix/Linux from source
    • Compilation options
    • Dynamic vs. static compilation of modules
    • Re-compiling
  • Testing Installation

Starting and Stopping Apache

  • Starting/Stopping Apache on Windows
    • Apache Monitor
    • Apache Executable
    • Windows Service
  • Starting/Stopping Apache on Unix/Linux
    • Apache Executable
    • apachectl script
  • Install Apache as a Service

Modules

  • Overview of Apache Modules
  • Installing Modules

The Apache Configuration Files

  • The contents of the /conf directory
  • The httpd.conf file
  • Directives
  • Sections
  • The Include Directive
  • The Options Directive
  • The Installed Directories

The htaccess File

  • Overview of .htacces files
  • Configuring .htaccess
  • The AllowOverride directive
  • Setting directory authentication
  • Allowing CGI scripts
  • Performance Issues

Virtual Hosts

  • Overview of Virtual Hosting
  • IP-Based Virtual Hosts
  • Name-based Virtual Hosts
  • Port-based Virtual Hosts
  • Bulk Virtual Hosting

MIME and File Types

  • Overview of MIME Types
  • Configuring MIME Types
  • Encoding Files
  • Character Sets
  • Languages

URL Mapping

  • Configuring Aliases
  • Configuring Redirects
  • The DocumentRoot Directive
  • Error Documents
  • Overview of mod_rewrite

Directory Indexing

  • The DirectoryIndex Directive
  • Fancy Indexing
  • Headers and Footers
  • Ignoring Files
  • Searching and Sorting

Performance Tuning

  • The ApacheBench Utility Program
  • Tweaking the Apache Configuration
  • Configuring Apache MPMs (prefork, worker, winnt)

Handlers and Filters

  • Overview of Handlers
  • The Section
  • Configuring Handlers
  • The server-status Handler
  • Overview of Filters
  • Configuring Filters

SSI

  • Overview of SSI
  • Configuring SSI
  • Using SSI Directives

Managing Scripts

  • Overview of scripting options
  • The mod_perl Module
  • Configuring mod_perl
  • Installing PHP on Windows
  • Configuring PHP

Security

  • Common Security Issues with Apache
  • Dynamic Content Issues
  • Authentication
  • Authorization
  • Access Control
  • Unix File Permissions
  • Configuring Apache for SSL
    • Overview of SSL
    • Installing mod_ssl
    • Generating SSL certificates
    • Configuring mod_ssl

    mod_rewrite

    • Overview
    • Benefits
    • Compilation & Configuration
    • Logging
    • API Phases
    • Ruleset Processing
    • RewriteRule Directive
      • Overview
      • Syntax
      • Regular expressions
      • Flags
      • Examples
    • RewriteCond Directive
      • Overview
      • Syntax
      • Flags
      • Examples
    • RewriteOptions Directive
    • RewriteBase Directive
    • RewriteMap Directive
    • RewriteLock Directive
    • mod_rewrite In Practice
      • Examples
      • Exercises

Additional Notes [top]

This course can be taught on both Windows and UNIX/Linux-type environments. The instructor covers both options during the training.