httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <>
Subject Re: [users@httpd] DOCUMENT_ROOT not set by mod_vhost_alias
Date Wed, 13 Aug 2003 13:13:37 GMT

On Tue, 12 Aug 2003, scott leonard wrote:

> i just converted my redhat 9/apache2 based webserver to use mod_vhost_alias
> to manage the growing number of virtual hosts being served.  perl cgi's that
> use $ENV{'DOCUMENT_ROOT'} are breaking.  the variable is not being set to
> the virtual hosts document root and is defaulting to '/etc/httpd/htdocs'.
> this sucks.

It is documented here:
that DOCUMENT_ROOT is not changed by mod_vhost_alias.

Although the main reason for this is technical, the developers of the
module do not consider it a big deal for one reason: DOCUMENT_ROOT is not,
in general, a good thing to use in CGI scripts.  The DOCUMENT_ROOT very
often does not relate to the actual location of documents because of
varias Aliases, RewriteRules, etc.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message