rgcid - Remote CGI daemon

Implements Remote GCI Protocol, V1.0

Options:

	-d xxx 	specify an alternate directory xxx

	-L 	restrict connections to local host (loopback) only

	-n      The RCGI daemon will not end the HTTP headers with
		a blank line.  If this flag is set, it is up to the
		UNIX script to finish off the HTTP headers with a
		blank line before sending the data.

	-p xxx  select port # xxx

	-r <pattern>
		restrict connections to hostnames which match pattern
		(*.xyz.com, a.b.com)

	-l	log to local file (i.e. don't use syslog)

	-x:1    turn on debug output

Overview:

This directory contains the source files for creating a UNIX RCGI
Daemon, which will allow the NetWare WEB Server to execute scripts
running on your UNIX machine.

On your NetWare machine, you'll need to configure your srm.cfg file
to add another RemoteScriptAlias line.  It should look something like
the following:

RemoteScriptAlias /remote/ 1.2.3.4:8001/usr/bin/

This essentially redirects all URLs under /remote to your UNIX RCGI
processor.

The rcgid binary that is included in this directory is built for
SunOS 4.x.  If you have a different version of Unix, then you will
will to recompile the program to run on your machine.

The directory "RCGISAMP" contains sample scripts that demonstrate how
the RCGI daemon works.  Basically, to see the RCGI Daemon in
operation, perform the following steps:

1. Copy rcgi to a directory on your UNIX box (you'll have to
   recompile it if it is not a SunOS box).

2. Copy all the files in the RCGISAMP subdirectory to the same
   directory you copied rcgi.

3. Edit your SYS:WEB\CONFIG\SRM.CFG file so that a line like the
   following exists:

   RemoteScriptAlias /unix/ unixhost.comp.com:8001

   where /unix/ is the name of the virtual URL path you want to
   trigger, unixhost.comp.com is the name of the UNIX machine running
   rcgid, and 8001 is the port that rcgid is listening to.

4. Stop and restart the NetWare Web server.

   LOAD WEB -D SYS:WEB

5. Now, on your Unix machine, CD to the directory that everything is
   in and invoke the RCGI daemon:

   % rcgi -p 8001 -n

   NOTE: you may want to launch this as a background process.

   It is recommended to use the -n switch so that the UNIX scripts
   can process the data more appropriately (i.e. return text/plain if
   it should choose to).  Otherwise, the RCGI daemon assumes that the
   data being returned is strictly HTML.

6. To make sure that all of your sample scripts are executable, make
   sure to perform the following commands:

   chmod 755 cgi-ls
   chmod 755 cgi-perl
   chmod 755 samp.pl
   chmod 755 myscript.pl

7. To access the RCGI daemon, access it from a Web Browser by
   requesting a URL such as the following:

   http://nwwebserv/unix/cgi-ls

   This will invoke the "cgi-ls" script on your UNIX box.

   Similarly, you can run "cgi-perl", "samp.pl", and "myscript.pl"
   the same way.

   http://nwwebserv/unix/cgi-perl/extra/path/info?a=b&c=d
   http://nwwebserv/unix/samp.pl/extra/path/info?a=b&c=d
   http://nwwebserv/unix/myscript.pl
