Document Root

This directive sets the directory from which httpd will serve files. Unless matched by a directive like Alias, the server appends the path from the requested URL to the document root to make the path to the document.

# Example:

DocumentRoot "/usr/web"

then an access to:

http://my.example.com/index.html

refers to:

/usr/web/index.html

If the directory-path is not absolute then it is assumed to be relative to the ServerRoot. The DocumentRoot should be specified without a trailing slash apache.org

To find the Apache Document Root use grep command as follows:

# grep -i 'DocumentRoot' httpd.conf

# Livecode Env Variable

In Livecode server the value of document root can be derived using:

put $_SERVER ["DOCUMENT_ROOT"] & slash into docRoot