Path to home directory is taken from command line as a first parameter. The second parameter is bind-port and the third is bind-address, both are optional, don't use them if unsure.
The default directory root file name is
index.html file is not found in a directory, TinyWEB then looks for
index.htm. If none of these two files are found, a file with name
index and extension from PATHEXT environment variable is executed as a CGI from
cgi-bin directory. If you have no such files in
cgi-bin, make sure that
index.htm exist in the directory first command line paramenter points to. Please refer to
error_log in case of any troubles.
POST commands are handled.
The following environment variables are passed to application:
To learn more about CGI, please search for "Common Gatewey Interface".
CGI interface was tested with ActivePerl for NT, which is available at http://www.activestate.com/
CGI application are being executed from
/cgi-bin/ directory only. All files requested from
/cgi-bin/ directory will be treated as CGI and executed, so don't put non-CGI files into
TinyWeb handles "Location" and "Status" CGI script output directives. "Location" may only contain an URL, local file redirections are not supported.
The samples to test CGI are provided in
cgitest.zip package within TinyWeb archive.
Note that TinyWeb extracts content-types, associated to file extensions, and script interpreters (e.g. Perl) from Windows Registry, so make sure that
.pl are registered file types. It means that I recommend to use
.pl as an extension for CGI-scripts written in Perl.
The information is being taken from registry (to TinyWeb's cache) on TinyWeb's startup, so if you made some content-type or file-assotiation-related changes of registry, you must reload TinyWeb in order to take effect.
TinyWeb keeps Apache-compatible The Common Logfile Format log files:
error_log, which can be analyzed by any compatible log analyzer.
Logs are kept in a derectory from that TinyWeb was started. Make sure that "Start In" directory of TinyWeb properties is set properly.
Please note that TinyWeb doesn't support W3C's Extended Log File Format.
As mentioned below, if an URI with empty name part specified (only path part is specified) and no index.html or index.htm found on this path, TinyWeb can run CGI application. Examples when only path part is specified are
http://www.ritlabs.com/tinyweb/. In that case TinyWEB first looks for
index.htm and, if none of them found, runs a file with name
index and extension from PATHEXT environment variable. For example, if PATHEXT is set to
/mydir/ is requested,
/cgi-bin/mydir/index.pl will be run. TinyWeb caches these CGI handler application pathnames, so if you had
/mydir/ and then removed that
index.pl and put
index.exe instead, you should reload TinyWeb.