# These are the absolute basics to launch the web server.
Listen 80
User apache
Group apache
ServerRoot /etc/httpd
# Turn off all options for didactic reasons.
Options None
# Follow symbolic links
Options +FollowSymLinks
# Set up MIME content type recognition
LoadModule mime_module modules/mod_mime.so
TypesConfig /etc/mime.types
# Enable default documents for directory queries
LoadModule dir_module modules/mod_dir.so
DirectoryIndex index.html
# Enable automatic indexing of directories
LoadModule autoindex_module modules/mod_autoindex.so
Options +Indexes
# Make the indexes "fancy" and read HTML pages' titles for descriptions
# Don't show the size and timestamp columns.
# Let the name and description columns be as wide as they need to be
# Put folders first
# Use default sizes for icons
# Arrange that header files should have their own HTML preamble
IndexOptions FancyIndexing ScanHTMLTitles SuppressSize SuppressLastModified NameWidth=* DescriptionWidth=* FoldersFirst IconWidth IconHeight SuppressHTMLPreamble HTMLTable
# Suppress backup and working files
IndexIgnore "#*#" "*~" "configuration"
# Delegate control via "configuration" files
AccessFileName "configuration"
# Put a header file above the listing
HeaderName HEADER.html
# Set up aliasing
LoadModule alias_module modules/mod_alias.so
Alias /icons/ /var/www/icons/
# Set up icons
AddIconByType /icons/layout.gif text/html
AddIconByType /icons/text.gif text/plain
AddIconByType /icons/generic.gif text/*
AddIconByType /icons/image2.gif image/*
AddIconByType /icons/sound1.gif audio/*
AddIconByType /icons/movie.gif video/*
AddIconByType /icons/ps.gif application/postscript
AddIconByType /icons/pdf.gif application/pdf
DefaultIcon /icons/ball.gray.gif
AddAltByType "HTML file" text/html
AddAltByType "Plain text" text/plain
AddAltByType "Text" text/*
AddAltByType "Static image" image/*
AddAltByType "Audio" audio/*
AddAltByType "Video" video/*
AddAltByType "PostScript" application/postscript
AddAltByType "PDF" application/pdf
AddIcon /icons/dir.gif "^^DIRECTORY^^"
AddIcon /icons/back.gif ".."
AddAlt "Directory" "^^DIRECTORY^^"
AddAlt "Up" ".."
# Set the error logging level to "info": informational messages.
# The default is "warn": warnings.
LogLevel info
# Specify the error log file.
ErrorLog /var/log/httpd/error.log
# Set up access logging
# Split the log files between the two virtual hosts
# Define the Common Log Format for both of them
LoadModule log_config_module modules/mod_log_config.so
LogFormat "%h %l %u %t \"%r\" %>s %b" clf
# We want hosts' names rather than addresss in the logs
HostnameLookups On
# Users' own web pages
LoadModule userdir_module modules/mod_userdir.so
# Access control by IP address - a bad idea
LoadModule access_module modules/mod_access.so
AllowOverride Limit
# Set up name-based virtual hosting on all interfaces.
NameVirtualHost *
ServerName chalk.dept.cam.ac.uk
DocumentRoot /var/www/CHALK
CustomLog logs/chalk.log clf
ServerName cheese.dept.cam.ac.uk
DocumentRoot /var/www/CHEESE
CustomLog logs/cheese.log clf
DirectoryIndex main.html index.html