Indiana University
  •  
  •  
  •  

About forms and CGI scripts on IU's web server

CGI programs and scripts are executable; if you have one, you are allowing anyone in the world to run a program on your computer. Because of the potential security risks, users with web pages on the UITS Mypage web server may not use CGI scripts.

CGI programs are permitted on the IU central web server (Webserve). Such programs must adhere to UITS's Network Information Services guidelines for information providers. See Executing CGI Scripts.

For information about obtaining an account on Webserve, see Getting a Webserve account

For more information about web pages at IU, visit the IU Webmaster's page.

On this page:


Setting up CGI scripts on Webserve

To run CGI scripts from your account on Webserve:

  1. Name your script so that it ends with a .cgi or a .pl extension. Scripts without one of these extensions will not run on Webserve.

  2. Put the script in your www directory or any subdirectory of your www directory.

  3. Set the permissions of the script to read, write, and execute for the owner only. To do this, move to the directory where your script is stored and, at the command prompt, enter: chmod 700 scriptname

    Replace scriptname with the name of your script. For more information on the chmod command, see In Unix, how do I change the permissions for a file?

  4. Make a link to your CGI script from a web page, or use the action attribute in the <form> tag of a form that submits information to your CGI script. As with your other files on the server, you don't need to include the www directory within the URL for your script. The URL of your script will be in the following form: http://www.iupui.edu/~netid/subdirectory/scriptname

    Replace iupui with your campus designation, if necessary. Replace netid with the account's Network ID username, and if your script is in a subdirectory of www, replace subdirectory with the name of the subdirectory of your script. Replace scriptname with the name of your script.

  5. Test your script to make sure it is working properly.

The information above comes from Executing CGI Scripts.

For useful utilities and guides for creating web pages on Webserve, see Tools for IU Information Providers.

Back to top

Alternatives to CGI programs

You may not need a CGI program to complete certain tasks. Consider the following options:

  • You can use Java applets; see Java support on IU web servers

  • You can limit who has access to your web pages; see Limiting access to web pages

  • You can use links to online utilities hosted by other sites, such as guest books and counters. Searching the web (e.g., using Google or Yahoo!) will return many useful links.

Back to top

Tutorials for forms and CGI applications

The IU Webmaster web site provides tutorials on using forms and CGI applications on Indiana University's web server (Webserve). In particular, the following may be helpful:

Back to top