Web Server Management: Running Apache 2.2 under Linux

Bob Dowling

University of Cambridge Computing Service

Jon Warbrick

University of Cambridge Computing Service

Installation: This course will first illustrate how to load the Apache package on a Linux server. The course uses a SUSE Linux Enterprise Server version 10 (SLES 10) system. This section of the course is Linux specific, and to a large extent SLES specific.

Configuration: The course will then demonstrate how to configure the web server from the ground up. The course does not teach tweaking of the default configuration but rather the writing of a configuration from scratch. The configuration will be suitable for a system running multiple virtual hosts. This part of the course applies to Apache on any platform.

These notes, and supporting material such as copies of the configuration files used in the course, are available at http://www-uxsup.csx.cam.ac.uk/~jw35/courses/apache/ Questions from web-server administrators in the University about running Apache, or other web matters, can be sent to .

Table of Contents
1. Installing the software
1.1. Installing the packages
1.2. Changes made to the system
1.3. Quick and Dirty Web Server
1.4. Apache documentation
2. The site's design
2.1. The server we want
2.2. One server, multiple 'virtual' hosts
2.3. Structures of HTTP queries and responses
3. Getting started
3.1. The least we can get away with
3.2. Virtual hosts
3.3. Reloading the configuration
4. Supporting MIME types
4.1. The Content-Type: header
4.2. MIME types on a SLES system
4.3. Loading and using the MIME module
5. Setting Options
5.1. Symbolic links
6. Handling directories
6.1. The problem with directories
6.2. Using default documents
6.3. Automatic indexing of directories
6.3.1. Basic listings
6.3.2. Improving the listings
6.3.3. Using an HTML table
6.3.4. Summary of the auto-indexing module
6.4. Using both modules
7. Logging
7.1. The error log
7.2. Access logs
7.3. Log rotation
8. Users' own web pages
9. Delegated control
9.1. Customising only part of a web site
9.2. Using Access Files
10. Access control
10.1. Two posibilities
10.2. Access control based on client IP address
10.3. Access control by client identity
10.4. Variations on a theme of user identification
10.5. University of Cambridge 'Raven' authentication
10.6. Mix and match: Location and Authentication
10.7. Blocking access to files
11. Conclusion
11.1. A finished configuration file
A. Apache modules
B. Reference information for logging
List of Tables
A-1. Modules shipped as part of the base apache2 package.
A-2. Modules shipped as part of other packages.
B-1. Escape sequences for custom logs
B-2. HTTP status codes