Re: CGI/1.1 draft

Rob McCool ([email protected])
Sun, 6 Mar 1994 16:42:11 --100


I don't think making DOCUMENT_ROOT available in general is such a good idea
because NCSA httpd doesn't just use DocumentRoot to translate names.
Arguably, most setups are like that, but nonetheless you are not guaranteed
that something comes from DocumentRoot (there are also Alias and ScriptAlias
directives). Doing uri->filesystem translation is simply not something we
can make available

Something I have implemented in 1.2 is that upon CGI execution, the server
changes its working directory to the directory of the currently executing
script. This would allow you to keep your config files in a subdirectory of
the script's directory, if you wanted, but the problem with that is that
people might be able to read them (I have also implemented CGI execution in
non-ScriptAlias directories). Someone mentioned making SCRIPT_TRANSLATED
available, in this setup, a script could get its real name from pwd and
SCRIPT_NAME or argv[0]. However, the spec. does not require the working
directory to be anything on script execution.

One idea I have found interesting is the idea of making some kind of
configuration directory available. Something like CGI_CONFIG which would be
set to a central location of CGI configuration files may be nice, but then
people will all have to have write access to this directory. So I'm not sure
if this would help much either. This could be set to SERVER_ROOT/conf for
NCSA httpd, or just allow users to configure it. The point would be to
create a central repository for CGI config. files which would be available
on any server.

--Rob