Hacked into CGI by Rob McCool (firstname.lastname@example.org)
wais.plis 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
waisindex command from the
directory of the freeWAIS distribution to do this.
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
http://server is the name of your server as it is
referenced in URLs.
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
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.
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:
$waisq: the location of the waisq binary from freeWAIS-0.202
$waisd: the directory you created your wais indexes in (such as
$src: the name you gave your indexes. If you used
/path/wais-sources/www, this will be set to
$title: the title of your database, such as "Fred's HTML recipes"
/cgi-bin/wais.pl. At this point, you will get an index document from which you may perform your searches.