Indiana University Bloomington

School of Informatics and Computing


Computer Science Program







 Home

 Contacts

 Courses

 Academics

 Careers

 Research

 People

 Calendar

 Resources

 Facilities
   FAQ
   System Notices
   Help
   Hardware
   Software
   Network
   Policies
   Lindley Hall

CSG FAQ

Q: How do I run CGI scripts on the department web server?

An Apache server with suEXEC support is running on cgi.cs.indiana.edu. This service is only available to those with a Sharkestra account, ie faculty, staff, and graduate students. In order to initialize your CGI environment run `makecgi` from your Sharkestra account. A short blurb will print out explaining how to use it. The service is proxied through the CS dept's main web server www.cs.indiana.edu via http://www.cs.indiana.edu/cgi-pub/username/script.cgi

If you must have a non-proxied CGI environment, then you can use http://cgi.cs.indiana.edu/~username/script.cgi instead. This is not the officially supported method of access and may change in the future, so http://www.cs.indiana.edu/cgi-pub/username/script.cgi is preferred.

Scripts should be placed in /l/cgi/username/cgi-pub in order to be referenced. All CGI processes will run on cgi.cs.indiana.edu.

CGI's must meet a few criteria in order to execute properly.

  1. /l/cgi/username home directory must have world execute permissions set

  2. The suEXEC Security Model must be met.

  3. By default, scripts must end with .cgi filename extention. If you want to have a cgi file without the .cgi extension, you can do this by creating a .htaccess file in the directory containing the script that contains something like this:

    <Files somefile>
    SetHandler application/x-httpd-cgi
    </Files>

    In this example, you would replace somefile with the name of your cgi script.

  4. CGI's will run under the users Unix UID

While debugging cgi scripts you may find it helpful to watch the cgi server error logs, which may include things like syntax or permission errors in your scripts. These logs are available in /l/apache/logs after you ssh to cgi.cs.indiana.edu. Please see the associated web/cgi server log file FAQ for more information.




See an error in this FAQ entry? Please report it.

[Return to the FAQ index]









Valid HTML 4.01!