Here are some hints for making CGI work properly on the CS machines:
- You'll want to put your CGI scripts in a subdirectory of /home/web/username
- That directory and the files in it need to have 755
permissions. (In particular, everyone needs to be able to read the
files, and the directory itself needs to be executable.)
- The script's extension needs to be .cgi, NOT .py.
- You need to have a link in your home directory called public_html
that points to your actual web directory. Here's a command that will
create this:
- ln -s /home/web/yourname ~/public_html
- Here
is a simple 'Hello World' CGI script that you can use to get this
stuff sorted out. It doesn't do anything interesting, but it'll be
useful in making sure you've got all these details right. (right-click
to save it to a directory.)
- Get this stuff set up right away - don't wait until the last
minute and assume it'll go smoothly. Often, there's some little thing
that's set up wrong that takes a while to sort out ...