CGI-BIN Access for AFS Accounts

The information on this page is intended for AFS accounts. Information on CGI programs for clubs that use /afs/cad/web/club/<clubname>/cgi-bin is here. Users with AFS accounts can run CGI executables located in the public_html/cgi-bin subdirectory of their login directory. This service is available on cgi.njit.edu only. The URL for such executables will be of the form: http://cgi.njit.edu/~<UCID>/cgi-bin/<script>.

To enable your AFS account for CGI, run the following program on any Linux AFS client:

/usr/ucs/bin/cgi.setup

Debug CGI programs

As an aid to debugging CGI programs, the portions of the web server error logs and access logs pertaining to a given user are available for inspection by that user (only). These logs are generated every 15 minutes, and are located in:

/afs/cad/pub/cgi.logs/{error_log, access_log}/<UCID>

Make sure your scripts are executable: chnod +x <script>

Users are entirely responsible for their code.

Sample Scripts

There are a few sample, working scripts in /afs/cad/pub/cgi.logs/scripts. You can copy these scripts to your cgi-bin directory and invoke them, to verify that your setup is working.

Server Side Includes (SSI)

Files with an ".shtml" extension in a user's public_html/ssi subdirectory of their login directory are processed for Server Side Includes, with no restrictions, on cgi.njit.edu. I.e., the URL would be of the form: http://cgi.njit.edu/~<UCID>/ssi/<filename>.shtml

To enable your account for SSI, run the following program on any Linux AFS client:

/usr/ucs/bin/ssi.setup

NOTE: User processes running on cgi.njit.edu are continuously monitored. Processes that consume too much resources, or otherwise significantly degrade the performance of cgi.njit.edu, will be killed. Users whose processes repeatedly degrade the performance of cgi.njit.edu, or compromise its security, will be barred from running programs on that machine.

Last Updated: April 10, 2015