Other servers are likely to be similar to simpleserver.cgi. To modify it to access your own catalogue you would replace the invocation of program getfield with an invocation of a program which searched your catalogue or DBMS.
simpleserver.cgi is more-or-less the simplest practical server, and is provided as an example. Additional useful features in a server include: copying the queries to a log file (so that you can monitor usage) and copying error messages to a second log file (as diagnostics in case of misadventure). Another server, secondserver.cgi, which incorporates these features, is supplied with this document. To install it, follow the same procedure as for simpleserver.cgi, except that the lines towards the top of the script which need to be modified are:
$queryExe = "/star/examples/ssn75/genfield";
$logDir = "/star/examples/ssn75/examplelogs";
When developing a server it is often useful to comment out the line:
$query = $ENV{'QUERY_STRING'};
and un-comment the line:
# $query = "ra=10:30:00&dec=-30:30.0&radius=3";
so that the script has a query `hard-wired'. It can now be run directly from the command line rather than be invoked via a Web browser. This trick often makes debugging scripts a lot easier.
Both the query and error log files written by secondserver.cgi are simple text files. Note, however, that file query.TXT, which is supplied with the examples, allows the query log to be accessed by CURSA[3] as an STL (Small Text List) format catalogue. Once the query log becomes large you might find it more convenient to examine it with the CURSA catalogue browser xcatview rather than Unix commands such as cat and more.
Writing Catalogue and Image Servers for GAIA and CURSA