Consider using the WN server. It has a great deal of search capability
built in. As an example try looking at the WN manual at
http://hopf.math.nwu.edu/docs/manual.html
(try the search and look at the index),
or the HTML2.0 specification at
http://hopf.math.nwu.edu/html2.0/index.html
Both of these make use of the WN search facilities and involve no
CGI scripts.
John Franks