How do I set up CGI scripts on Webserve?
To run CGI scripts from your account on Webserve:
- Name your script so that it ends with a
.cgior a.plextension. Scripts without one of these extensions will not run on Webserve.
- Put the script in your
wwwdirectory or any subdirectory of yourwwwdirectory.
- 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
scriptnamewith the name of your script. For more information on thechmodcommand, see In Unix, how do I change the permissions for a file? - Make a link to your CGI script from a web page or using 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
wwwdirectory within the URL for your script. The URL of your script will be in the following form: http://www.iupui.edu/~netid/subdirectory/scriptnameReplace
iupuiwith your campus designation, if necessary. Replacenetidwith the account's Network ID username, and if your script is in a subdirectory ofwww, replacesubdirectorywith the name of the subdirectory of your script. Replacescriptnamewith the name of your script. - Test your script to make sure it is working properly.
The information above comes from the IU Webmaster's Executing CGI Scripts page.
For useful utilities and guides for creating web pages on Webserve, see the IU Webmaster's Tools for IU Information Providers page.
Last modified on October 26, 2009.







