httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
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:
http://httpd.apache.org/docs-2.0/vhosts/mass.html#overview
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.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message