CGI programs must either end in .cgi (from a personal home web directory) or be in or below the /cgi-bin/ directory on the web server.

The following are examples of cgi programs

Simple Shell Echo CGI

To call or for source

Simple Shell to run a program

To call or for source

Simple Shell with a query string

To call or for source

Simple perl to show environment variables

To call or for source

Simple perl to show environment variables

To call or for source

Simple form and it's cgi file

To call or for source

Simple printing of formatted html from perl

To call or for source

Madam Perl will predict your age (given certain facts)

To call or for source or view Madam Perl's visitor log

Turning browser cache off for a page

Sample cgi with cache control and it's source.

Server Side Includes

To see a page with examples on how to setup Server Side Includes for last modification date/time and counters.

Simple example of sending email from a web page

To call or for source

Msql web interface examples (Andrews users only)

To call

Sample .htaccess and .htpasswd files

Sample .htaccess file to enable server side includes on Apache2

Some good tutorials on setting up .htaccess include:

  • HTML Security
  • NCSA Mosaic User Authentication
  • HTML Pages: Password Access
  • This url generates an account:passwd entry for you .htpasswd file here or locally.