CGIWrap - User Instructions
General Information
Cgiwrap is a gateway program that will allow you to run cgi scripts from your own directory. Your scripts are run under the control and protection of cgiwrap so you need not be worried about comprising the security of our web server or damaging files of other users.
Setup Instructions
The following are instructions for setting up your account to be able to use cgiwrap to execute cgi scripts. It is assumed that you are familiar with writing CGI scripts and writing HTML documents for the WWW.
In the following instructions, we'll assume your login name, home directory, CGI directory, script name and domain name are:
Login Name: joe Home Directory: /home/joe CGI Directory: /home/joe/cgi-bin Name of Script: yourscript.cgi Domain Name: domain.com
Note: Use the name of the script you want to run instead of "yourscript.cgi".
If you do not already have a cgi-bin directory set up, create one:
cd /home/joe mkdir cgi-bin
Install the script into the cgi-bin directory, and set the proper execution permissions on the file.
cp yourscript.cgi /cgi-bin/yourscript.cgi chmod 755 /cgi-bin/yourscript.cgi
The script is executed using the following URL:
/cgi-bin/cgiwrap/joe/yourscript.cgi, or http://www.domain.com/cgi-bin/cgiwrap/joe/yourscript.cgi
If you wish to see debugging output for your CGI, specify cgiwrapd instead of cgiwrap, as in the following URL:
http://www.domain.com/cgi-bin/cgiwrapd/joe/yourscript.cgi
If the script is an nph- style script, you will need to run it using the following URL's:
http://www.domain.com/cgi-bin/nph-cgiwrapd/joe/yourscript.cgi
Troubleshooting
Make sure you've created a directory with the name 'cgi-bin' in your login directory. If your login name is 'joe' then the directory would be '/home/joe/cgi-bin'
Make sure the permissions for your cgi-bin directory and cgi program are set at 755. This mean user can read, write and execute; group can read and execute; and world can read and execute.
If you're using a Perl script the first line of the script must read '#!/usr/bin/perl'. This allows your script to find Perl. (We use Perl 5.002 or better.)
If you want to use the sendmail program the correct location is '/usr/bin/sendmail'.
Make sure you're calling your cgi program properly. A sample Form Action command would be <form action="cgi-bin/cgiwrap/joe/yourscript.cgi" method="GET">
|