CGI WAIS gateway

Plexus version by Tony Sanders (

Hacked into CGI by Rob McCool ( is a PERL script which interacts with freeWAIS-0.202 to index the files on your server.

In order to use this script, you must be using a CGI/1.0 compliant server. I am partial toward NCSA httpd 1.0 since I wrote it. If you would like to see this gateway in action, see the

To begin with, you will need to make a WAIS index of your server. The first step is to download, compile, and install freeWAIS-0.202 on your system. Once you have done that, you must index your server. You will use the waisindex command from the bin directory of the freeWAIS distribution to do this.

Usage of waisindex is as follows:

waisindex -l 1 -export -d /path/wais-sources/name -t URL /path/html-data http://server -r /path/html-data

What does this mean?

/path/wais-sources/name is the file you wish to keep your WAIS indexes in. The directory /path/wais-sources must exist, but www will be created for you. These indexes will be roughly the size of the documents they index.

/path/html-data is the location of the HTML documents you are indexing.

http://server is the name of your server as it is referenced in URLs.

Once you have done this, you will have a WAIS index of your server's documents. The next step is to run a WAIS server on your machine.

To do this, use the waisserver command from the bin directory of the freeWAIS-0.202 distribution.

Usage of waisserver is as follows:

waisserver -l 0 -p 210 -d /path/wais-sources

/path/wais-sources is the same directory you specified above.

If you have done all of this correctly, you should now have a wais server running on your machine, indexing all of your documents. Now, you need to set up the gateway.

You now need to set up the actual script. The first thing to do is to move it to the CGI scripts directory for your server.

Next, you must edit the script to reflect your local settings. You don't need to know PERL to do this. Set the following variables to the following values:

To use the script, simply open the script on your server. An example would be opening /cgi-bin/ At this point, you will get an index document from which you may perform your searches.

Rob McCool,