93
by mattgiuca
New directory hierarchy. |
1 |
src directory - README
|
2 |
======================
|
|
3 |
||
4 |
This directory is the root of the IVLE web application proper. It is this |
|
5 |
directory that should be installed into the web server to be executed. |
|
6 |
Navigating to the place this directory is installed shall be the entrypoint |
|
7 |
into the application. |
|
8 |
||
9 |
Note that no files placed in this directory or its subdirectories will be |
|
10 |
directly visible from the web, *except* those files placed in `/media` or its |
|
11 |
subdirectories. |
|
12 |
||
13 |
Apache configuration
|
|
14 |
--------------------
|
|
15 |
||
256
by mattgiuca
Changed the way IVLE's path is loaded into Python's sys.path. Now a file |
16 |
IVLE should be installed into a place on the file system, and then there |
17 |
should be a symlink created from Apache. Apache should symlink its IVLE |
|
18 |
directory to the "www" directory, a subdirectory of the IVLE trunk. |
|
19 |
||
93
by mattgiuca
New directory hierarchy. |
20 |
The Apache conf file should have the following directives added to it, which |
21 |
configures the site to direct all URLs to the main dispatcher (except for |
|
22 |
files in the /media directory). |
|
23 |
||
24 |
# IVLE directory configuration |
|
25 |
# See src/README for instructions and explanation |
|
26 |
<Directory "/ivle-directory"> |
|
27 |
SetHandler mod_python |
|
256
by mattgiuca
Changed the way IVLE's path is loaded into Python's sys.path. Now a file |
28 |
PythonHandler dispatch |
93
by mattgiuca
New directory hierarchy. |
29 |
#PythonDebug On |
30 |
Options FollowSymLinks |
|
396
by drtomc
Alter the apache config so that session objects get stored on disk. We're arranging for the disk in question to be a shared NFS filesystem so users get logged in across all the machines in the cluster. Theoretically. |
31 |
PythonOption mod_python.file_session.database_directory /path/to/shared/sessions |
93
by mattgiuca
New directory hierarchy. |
32 |
</Directory> |
33 |
<Directory "/ivle-directory/media"> |
|
34 |
SetHandler None |
|
35 |
</Directory> |
|
36 |
||
37 |
Where `ivle-directory` is the path to root directory of IVLE on the web
|
|
256
by mattgiuca
Changed the way IVLE's path is loaded into Python's sys.path. Now a file |
38 |
server (the symlink which points to "www"). |
93
by mattgiuca
New directory hierarchy. |
39 |
|
40 |
Uncomment `PythonDebug On` to turn on debugging.
|
|
41 |
||
42 |
Note that this disables directory listings across the whole site (which |
|
43 |
essentially only affects the /media directory). |
|
44 |
||
256
by mattgiuca
Changed the way IVLE's path is loaded into Python's sys.path. Now a file |
45 |
Python Site configuration
|
46 |
-------------------------
|
|
47 |
||
48 |
The setup install script automatically configures ivle.pth in the Python site |
|
49 |
packages directory. This section is for if you run into trouble. |
|
50 |
||
51 |
You need to set up IVLE as a Python site to allow importing of IVLE modules. |
|
52 |
If this step is done improperly, you will see "ImportError: No module named |
|
53 |
dispatch". |
|
54 |
||
55 |
Place a file in the Python site packages directory |
|
56 |
(ie. /usr/lib/python2.5/site-packages) called "ivle.pth". In it place a |
|
57 |
single line containing the full path to the "www" directory inside |
|
58 |
trunk in the installed location. |
|
59 |
||
60 |
See http://docs.python.org/lib/module-site.html for information about |
|
61 |
configuring .pth files. |
|
62 |
||
93
by mattgiuca
New directory hierarchy. |
63 |
Application configuration
|
64 |
-------------------------
|
|
65 |
||
66 |
Additional settings must be written to allow IVLE to work (such as the root |
|
67 |
URL and student file space directories). The web application will throw an |
|
68 |
exception if these have not been set up (if conf/conf.py does not exist). |
|
69 |
||
70 |
Run setup.py, a command-line tool, which will interactively create |
|
71 |
conf/conf.py for you. |
|
72 |
||
73 |
Special handling of media directory
|
|
74 |
-----------------------------------
|
|
75 |
||
76 |
One important exception: Apache must be configured so that the `/media`
|
|
77 |
directory and its subdirectories are served directly as-is, with no special |
|
78 |
handling. |
|
79 |
||
80 |
Files in the `/media` directory should be served with the standard MIME types
|
|
81 |
(eg. text/html for .html, image/png for .png). **No** server-side script
|
|
82 |
handling should take place in the media directory. That is, .py and .php files |
|
83 |
should be simply served up as text/plain or whatever their default MIME type |
|
84 |
is. |
|
85 |
||
86 |
This simply means that the web server should NOT be configured to handle |
|
87 |
scripts anywhere in the ivle directory, except for the above handling code. |
|
88 |
||
89 |
Subdirectories
|
|
90 |
--------------
|
|
91 |
||
92 |
* /apps - Each plugin application has its own directory.
|
|
93 |
* /dispatch - Handler module for the top-level dispatch.
|
|
94 |
* /media - Contains files directly served by Apache (see above).
|
|
95 |
* /conf - Administrator configuration files (see /conf/README).
|