# 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 # Load the modules needed for this file LoadModule mime_module modules/mod_mime.so LoadModule dir_module modules/mod_dir.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule alias_module modules/mod_alias.so LoadModule log_config_module modules/mod_log_config.so LoadModule userdir_module modules/mod_userdir.so LoadModule access_module modules/mod_access.so LoadModule auth_digest_module modules/mod_auth_digest.so # Set up MIME type recognition by file name extension TypesConfig /etc/mime.types # Enable default documents for directory queries DirectoryIndex index.html # Enable automatic indexing of directories 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 # Put a header file above the listing HeaderName HEADER.html # Set up aliasing 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" ".." # Suppress backup and working files from indexes IndexIgnore "#*#" "*~" "configuration" # Delegate control via "configuration" files AccessFileName "configuration" Order allow,deny Deny from All # Set the error logging level to "info": informational messages. 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 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 UserDir public_html # 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 Order Allow,Deny Allow from csi.cam.ac.uk AuthType Digest AuthName "Cheese lovers only" AuthDigestDomain /games/ AuthDigestFile /etc/httpd/access/digest_pw AuthDigestGroupFile /etc/httpd/access/group Require group cheddar stilton Satisfy any