Operation Manual
DocumentRoot
Path to the directory from which Apache should serve les for this host. For secu-
rity reasons, access to the entire le system is forbidden by default, so you must
explicitly unlock this directory within a Directory container.
ServerAdmin
E-mail address of the server administrator. This address is, for example, shown on
error pages Apache creates.
ErrorLog
The error log le for this virtual host. Although it is not necessary to create separate
error log les for each virtual host, it is common practice to do so, because it makes
the debugging of errors much easier. /var/log/apache2/ is the default direc-
tory for Apache's log les.
CustomLog
The access log le for this virtual host. Although it is not necessary to create separate
access log les for each virtual host, it is common practice to do so, because it allows
the separate analysis of access statistics for each host. /var/log/apache2/ is
the default directory for Apache's log les.
As mentioned above, access to the whole le system is forbidden by default for security
reasons. Therefore, explicitly unlock the directories in which you have placed the les
Apache should serve—for example the DocumentRoot:
<Directory "/srv/www/www.example.com/htdocs">
Order allow,deny
Allow from all
</Directory>
The complete conguration le looks like this:
Example 30.4
Basic VirtualHost Conguration
<VirtualHost 192.168.3.100>
ServerName www.example.com
DocumentRoot /srv/www/www.example.com/htdocs
ServerAdmin webmaster@example.com
ErrorLog /var/log/apache2/www.example.com_log
CustomLog /var/log/apache2/www.example.com-access_log common
<Directory "/srv/www/www.example.com/htdocs">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
The Apache HTTP Server 501