in reply to $ENV{DOCUMENT_ROOT}, for web config files

Spidy

On my servers (a pretty typical configuration) each subdomain is in a directory below the public_html of the root domain. A CGI in the subdomain has its DOCUMENT_ROOT as it own root directory. So it would not have any issues on my systems, but it is possible that some setups would.

Personally I would change your approach so that the systemname.cfv had a unique name for each sub-domain thus they would not clash with each other. I would also be inclined to save it in the same directory as the CGI itself, or in a directory off the document root.

Although it is not a Perl application, the techniques used in MySQL's Eventum event manager ( a PHP application ) are worthy of study. It does pretty much what youare doing.

jdtoronto

  • Comment on Re: $ENV{DOCUMENT_ROOT}, for web config files

Replies are listed 'Best First'.
Re^2: $ENV{DOCUMENT_ROOT}, for web config files
by Spidy (Chaplain) on Aug 03, 2006 at 02:39 UTC
    The problem with saving off the document root or in the same directory is that the system's source code is being passed around; theoretically, anyone with malicious intent who got ahold of it would be able to get at someone's config file easily, and retrieve the important information. Putting things into DOCUMENT_ROOT/../systemname.cfv puts the file above public_html, so that people cannot access it with a web browser. Which is what I need.