- Used to provide additional functionality on web pages within the albany.edu domain
- To create your CGI directory, type startcgi at the command prompt from your home directory in your Unix account. This script creates a public_cgi subdirectory where your CGIs will be stored. (You need only to run this command once.)
- Write your CGI script. All CGI scripts must be placed in your public_cgi directory and named with a ".cgi" file extension. In the example below, you will create a very basic script called "hello.cgi". Using the "pico" text editor, you will create a script which will simply print the words "Hello World!" in your browser window.
Type pico public_cgi/hello.cgi at the command prompt. Type in the script as shown below: #!/bin/sh
You should now be back to the Unix command line prompt.
3. Type setcgi to allow web browsers to view your CGI.
4. Link to your scripts from a web browser by using the following address format:
For example: cgi.albany.edu/~ab1234/hello.cgi
Support is not provided beyond basic setup questions provided in this article.