Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

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 At IU, who can have an account on Webserve, and how do I get one?

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:

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

This is document agrs in domain all.
Last modified on January 31, 2011.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.