next up previous 89
Next: Modifying the server
Up: Creating a Server
Previous: Results returned

Installing and testing the server

The procedures for installing CGI scripts vary at different sites; your system manager should be able to advise on arrangements at your site. However, to install simpleserver.cgi you need to follow at least the following steps.

  1. Copy files simpleserver.cgi and genfield.c to a suitable directory (there are likely to be restrictions on which directories can contain CGI scripts; see your system manager).

  2. Compile program genfield.c and name the executable genfield. genfield.c is a standard (and simple) C program; any C compiler should be able to handle it.

  3. Edit file simpleserver.cgi. Locate the line:

    $queryExe = "/star/examples/ssn75/genfield";

    which is towards the top of the script and change it to correspond to whichever directory you have put the files in.

  4. Check with your system manager whether there are any other local requirements for running CGI scripts.

  5. You are now ready to test the server. The tests are best conducted from a normal Web browser, such as netscape. Start the browser and enter a URL similar to:

    http://www.roe.ac.uk/~acd/cgi-bin/simpleserver.cgi?ra=10.0&dec=30.0&radius=3
    

    This string comprises the normal URL for the CGI script, followed by a `?', followed by the query. This format is the normal syntax for invoking CGI scripts and passing queries to them. To invoke your version of the server you would substitute the appropriate URL in the example above. Typing in the example exactly as given should invoke a version of the server running in Edinburgh. If all is working correctly the browser should display a table similar to the one in Figure [*]. If the server fails then your Web server probably maintains error logs which might contain useful diagnostics; your system manager should know where these logs are kept.

Figure: The table of values returned by the ACL server simpleserver.cgi.
\begin{figure}\par
\begin{quote}
\begin{verbatim}Example Star Field....



next up previous 89
Next: Modifying the server
Up: Creating a Server
Previous: Results returned

Writing Catalogue and Image Servers for GAIA and CURSA
Starlink System Note 75
A.C. Davenhall
26 July 2000
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils