1 Configuring Apache:
2
3 To configure applications without authenticators, use the config.py script
4 in tools/Apache to set up mod_python applications. For example:
5
6 python tools/Apache/config.py \
7 CGI \
8 /home/paulb/Software/Python/WebStack/examples/CGI/CookiesApp.py \
9 /etc/apache2/sites-available \
10 cookies \
11 /cgi/cookies
12
13 This script can also be used to configure mod_python applications.
14
15 --------
16
17 The manual way:
18
19 Declare the script in httpd.conf or equivalent Web server configuration file.
20 For example:
21
22 ScriptAlias /cgi/simple "/home/paulb/Software/Python/WebStack/examples/CGI/SimpleHandler.py"
23
24 The WebStack package must reside on the PYTHONPATH, along with the package
25 containing the application itself. Therefore, ensure that the handler uses the
26 appropriate entries in sys.path.
27
28 Ensure that the handler file for the application has the appropriate
29 permissions:
30
31 chmod u+x examples/CGI/SimpleHandler.py
32
33 --------
34
35 Session storage with CGI:
36
37 The very simple SessionStore class provided in WebStack.Helpers.Session, and
38 used by the WebStack.CGI.Transaction class, requires that a directory be created
39 in the directories of the CGI programs being run with the name
40 "WebStack-sessions". Here are some example commands for doing this:
41
42 cd examples/CGI
43 mkdir WebStack-sessions
44 chown username.groupname WebStack-sessions
45
46 The given "username" and "groupname" correspond to the user and group the Apache
47 server assumes when running.