ここでは、WAISサーバに freeWAIS-sf を、ゲートウェイに wwwwais を使用し てインストールした例を説明します。
次に、書類のインデックスを作成します。ここでは、RFC をインデックス化し た例を示します。
# cd /var/spool/wais # waisindex -d rfc -r /usr/local/etc/httpd/htdocs/RFCそして、WAISサーバを起動します。
# waisserver -p 210 -u wais -e /var/log/wais/wais.log -d /var/spool/wais
CONFFILE の定義を変更後、以下のようにコンパイルし、CGI-BIN へインストー ルします。
# cc -O -o wwwwais wwwwais.25.c # cp wwwwais $CGI-BIN次に、下記の wwwwais.conf 内の項目を変更します。
WaisSource /var/spool/wais/rfc/src "RFC"
       
  
SourceRules replace "/usr/local/etc/httpd/htdocs/" "/"
SourceRules prepend "http://www.foo.co.jp/cgi-bin/print_hit_bold.pl"
SourceRules append "?$KEYWORDS#first_hit"
*** wwwwais.25.c	Mon Feb 12 14:38:26 1996
--- wwwwais.251e.c	Mon Feb 12 17:16:44 1996
***************
*** 1119,1132 ****
  			selection)) ? " selected" : "", sourcelist->line);
  			sourcelist = sourcelist->next;
  		}
! 		printf("</select>\n<p>\n");
  	}
  	printf("<input type=hidden name=message value=\"%s\">\n",
  	"If you can see this, then your browser can't support hidden fields.");
  	printf("<input type=hidden name=source value=\"%s\">\n", source);
  	printf("<input type=hidden name=sourcedir value=\"%s\">\n", sourcedir);
- 	printf("<input type=hidden name=maxhits value=\"%s\">\n", maxhits);
- 	printf("<input type=hidden name=sorttype value=\"%s\">\n", sorttype);
  	printf("<input type=hidden name=host value=\"%s\">\n", host);
  	printf("<input type=hidden name=port value=\"%s\">\n", port);
  	printf("<input type=hidden name=searchprog value=\"%s\">\n",
--- 1119,1148 ----
  			selection)) ? " selected" : "", sourcelist->line);
  			sourcelist = sourcelist->next;
  		}
! 		printf("</select>\n<br>\n");
  	}
+ /*	printf("<input type=hidden name=maxhits value=\"%s\">\n", maxhits);*/
+ /*	printf("<input type=hidden name=sorttype value=\"%s\">\n", sorttype);*/
+ 	printf("Maxhits: ");
+ 	printf("<select name=\"maxhits\">\n");
+ 	printf("<option> 10\n");
+ 	printf("<option> 20\n");
+ 	printf("<option> 40\n");
+ 	printf("<option> 100\n");
+ 	printf("<option value=9999> all\n");
+ 	printf("</select>\n<br>\n");
+ 	printf("Sorttype: ");
+ 	printf("<select name=\"sorttype\">\n");
+ 	printf("<option value=score> Score\n");
+ 	printf("<option value=lines> Lines\n");
+ 	printf("<option value=bytes> Bytes\n");
+ 	printf("<option value=title> Title\n");
+ 	printf("<option value=type> Type\n");
+ 	printf("</select>\n<br>\n");
  	printf("<input type=hidden name=message value=\"%s\">\n",
  	"If you can see this, then your browser can't support hidden fields.");
  	printf("<input type=hidden name=source value=\"%s\">\n", source);
  	printf("<input type=hidden name=sourcedir value=\"%s\">\n", sourcedir);
  	printf("<input type=hidden name=host value=\"%s\">\n", host);
  	printf("<input type=hidden name=port value=\"%s\">\n", port);
  	printf("<input type=hidden name=searchprog value=\"%s\">\n",