Apache Configuration Conventions


very virtual host has a conf/ subdirectory of its server root, which contains Apache configuration information for that virtualhost.

By convention, configuration files for plain-vanilla Apache are named httpd.conf while configuration files for Apache-SSL are named httpsd.conf.

Server Configuration Files

ome of the subdirectories of /stage/w3serv correspond to the primary names of web-serving boxes. Currently, these include limousin.cs.uchicago.edu, stale.cs.uchicago.edu, and a few others. The Apache configuration files in these subdirectories serve as the main configuration file for these servers. So
is the main configuration file for limousin.

The bulk of these server configuration files are Apache directives that we've built up over the years to do what we want with the servers. Apache configuration information is beyond the scope of this documentation; information is available at httpd.apache.org.

The important thing to notice about these files lives at the very end: things like

Include /stage/w3serv/ai.cs.uchicago.edu/conf/httpd.conf
Include /stage/w3serv/cjtcs.cs.uchicago.edu/conf/httpd.conf
Include /stage/w3serv/www.cs.uchicago.edu/conf/httpd.conf
Include lines like these incorporate individual virtual hosts' configuration files into the main server configuration file. The above three lines include the virtual host configuration files for ai, cjtcs, and the main web page.

Virtual Host Configuration Files

n individual virtual host configuration file specifies the Apache settings for a single virtual host. At its simplest, a virtual host's conf/httpd.conf looks like this:
<VirtualHost *>
# Specify the docs directory for this virtual host
  DocumentRoot /stage/w3serv/vhost.cs.uchicago.edu/docs
  ServerName vhost.cs.uchicago.edu
  ServerAlias vhost.cs vhost
# Don't allow home directories (/~username) on this virtual host
  UserDir disable
but of course many contain more complex directives to produce the needed results.