Overview of WeBWorK system setup Where to put the WeBWorK files
The WeBWorK files can be placed almost anywhere but a reasonable location is as follows.
Your webserver uses two directories (often called htdocs or html
and cgi-bin ) under which it expects to find html documents and cgi scripts
respectively. These two directories are usually subdirectories of a directory called
httpd or www . We'll assume this parent directory is called
www . The webwork.tar file should be placed in the www
directory and then untarred (see Setting up a WeBWorK system).
This will create a directory webwork containing the system
and courses subdirectories (each, in turn, containing their own files and subdirectories).
So the directory structure will look like: www htdocs cgi-bin webwork system courses
The webwork directory should not be a subdirectory of the htdocs
directory as you do not want anyone using the web to have direct access to any files under the
webwork directory. The system directory contains all the files
needed by the WeBWorK system. The courses directory contains files related to the
individual WeBWorK courses. How does WeBWorK interact with the webserver?
No WeBWorK files are directly accessible from the web. Rather all access is through two types of
methods, one for cgi scripts and one for html files. The WeBWorK cgi directory can be accessed
through either of two methods.
The first method of accessing the WeBWorK cgi directory is through a link. One cgi link
(set up in step 8 of Setting up a WeBWorK system)
gives access to all of WeBWorK's cgi scripts. Note that this requires your
webserver to be set up to follow symbolic links under the cgi-bin directory (see step 2 of Setting up a WeBWorK system). If for some reason you do not want to set up your webserver this way, we suggest
you first do so on a temporary basis and get WeBWorK running. Then you can move WeBWorK's cgi directory
(www/webwork/system/cgi ) so that it lies under the webserver's cgi-bin directory at which point
a cgi link will not be needed. Or you can use the second method.
The second method of accessing the WeBWorK cgi directory is through (at least with Apache) a
ScriptAlias directive in Apache's httpd.conf file
(set up in step 8 of Setting up a WeBWorK system).
With this method it is not required that your
webserver to be set up to follow symbolic links for cgi scripts. Note that the Apache performance tuning
document mentions there is a performanace hit (probably slight) if your webserver is not configured to
follow symbolic links.
There is one html link (set up in step 11 of
Setting up a WeBWorK system) that gives access to the html files used by the WeBWorK system.
In addition there is one html link for every course that gives access to the html files used by
each individual WeBWorK course (this link is set up when setting up a course). Note that this
requires your webserver to be set up to follow symbolic links under the htdocs directory, i.e. the html
document root (see step 1 of Setting up a WeBWorK system). What does the system setup script do?
This script is run only when you initially set up the WeBWorK system.
It modifies all the scripts entering the correct path to perl on your system.
It modifies many of the scripts entering the correct path to WeBWorK on your system.
It sets the correct permissions and groups for all the files and directories. This is extremely tricky to
get correct by hand if you want to have a functioning and secure system.
It modifies the Global.pm file entering the cgi and html WeBWorK URL's for your
system. The variables defined in the Global.pm file set defaults and
parameters for the whole WeBWorK system. Defaults can be over ridden for individual courses by
redefining variables in the individual course webworkCourse.ph files.
It modifies the html document files entering the correct path to gifs, other documents, etc. What does the course setup script do?
This script is run every time a WeBWorK course is set up.
It sets the correct permissions and groups for all the course files and directories. Any
missing files or directories are created.
It creates the webworkCourse.ph file. The variables defined in this file set defaults and
parameters for the individual course. System defaults set in Global.pm can be over
ridden for the individual course by redefining variables in the webworkCourse.ph file.
It creates a generic but functional index.html , i.e. a front page, for the course.
Almost certainly, professors will want to customize this page
<| Post or View Comments |>
|