DocumentRoot directive


Purpose

The DocumentRoot directive sets the directory from which HTTPd will serve files.

If you need to serve files outside this directory, you can use the Alias directive, or create symbolic links.

This directive affects how you access files on your server.


Syntax

DocumentRoot dir

Where dir is an absolute path of the directory you want documents to be served from.

Only one DocumentRoot directive is allowed in the server configuration file.


File

srm.conf

Default

If you do not specify a DocumentRoot, HTTPd assumes:

DocumentRoot /usr/local/etc/httpd/htdocs


Example

DocumentRoot /home/web

This would set DocumentRoot to the directory /home/web.


[Back] Return to Resource Configuration File Overview
NCSA HTTPd Development Team / httpd@ncsa.uiuc.edu / Last Modified 7-12-95