Next: Beginning CGI Programming in
Up: CGI Scripting
Previous: CGI Scripts on Macintosh
The process of installing CGI scripts is similar to that of HTML pages, except different directories
and URLs are used.
- project_cgi-bin
- -- Files place in this directory will be accessible only within
the department.
- public_cgi-bin
- -- Files place in this directory will be viewable on the whole
Internet. This is where you would create your Home Page.
- Use URL: http://www.cs.cf.ac.uk/User-bin/A.B.Surname where A.B.Surname
is your long email name to reference scripts from HTML or direct URL.
- You will have to initially create and register your public_cgi-bin directory on the COMSC
Information Server. See Creating your own HOME PAGE and Online User Guides http://www.cs.cf.ac.uk/User/howto.html.
- CGI scripts placed here will need their access permission changed. See instructions below and
follow except for different directory name or the above reference WWW page.
Creating a project_cgi-bin
Initially you will have to create and change access permissions on a project_cgi-bin.
All CGI scripts should be placed in a directory project_cgi-bin.
Here's how to create the directory:
- Use BetterTelnetPPC to Telnet to thrall.cs.cf.ac.uk.
- Login to thrall with you UNIX User ID (e.g. scm...)
and password at the terminal window of Telnet.
- From within the user's top level (home) directory -- the directory you login to.
- Create the project_cgi-bin directory. Type the following at the BetterTelnetPPC terminal
window
mkdir public_cgi_bin
- Next, set the project_cgi-bin directory access modes so that the Web
server can read its contents.
- To do this type the following at the BetterTelnetPPC terminal window
chmodwww public_cgi_bin
Running Individual CGI scripts
Simply place (FTP) the CGI script in the project_cgi-bin.
Every CGI script will need to have certain access modes changed. This can be done from Macintosh (with
Fetch) or on UNIX (via BetterTelnetPPC connection).
To set file access modes from Fetch (just before FTP transfer):
To Set CGI file permissions from UNIX:
You should now be able to access the script using URL:
http://www.cs.cf.ac.uk/User/A.B.Surname
Next: Beginning CGI Programming in
Up: CGI Scripting
Previous: CGI Scripts on Macintosh
Dave Marshall
9/28/2001