Added note about CGI env vars

This commit is contained in:
Sergey Lyubka 2014-02-07 20:23:37 +00:00
parent 6f8751b479
commit fbd5d77ce8

View File

@ -43,8 +43,14 @@ Note that PHP scripts must use `php-cgi.exe` executable, not `php.exe`.
All files that match `cgi_pattern` are treated as CGI files. Default pattern All files that match `cgi_pattern` are treated as CGI files. Default pattern
allows CGI files be anywhere. To restrict CGIs to a certain directory, allows CGI files be anywhere. To restrict CGIs to a certain directory,
use `/path/to/cgi-bin/**.cgi` as pattern. Note that full file path is use `/path/to/cgi-bin/**.cgi` as pattern. Note that full file path is
matched against the pattern, not the URI. Note: if `MONGOOSE_CGI` environment matched against the pattern, not the URI.
variable is set, then Mongoose passes it to the CGI script.
When Mongoose starts CGI program, it creates new environment for it (in
contrast, usually child program inherits the environment from parent). Several
environment variables however are inherited from Mongoose's environment,
they are: `PATH`, `TMP`, `TEMP`, `TMPDIR`, `PERLLIB`, `MONGOOSE_CGI`. On UNIX
it is also `LD_LIBRARY_PATH`. On Windows it is also `COMSPEC`, `SYSTEMROOT`,
`SystemDrive`, `ProgramFiles`, `ProgramFiles(x86)`, `CommonProgramFiles(x86)`.
Default: `**.cgi$|**.pl$|**.php$` Default: `**.cgi$|**.pl$|**.php$`