1 Declare the script in httpd.conf or equivalent Web server configuration file.
2 For example:
3
4 ScriptAlias /cgi/simple "/home/paulb/Software/Python/WebStack/examples/CGI/SimpleHandler.py"
5
6 The WebStack package must reside on the PYTHONPATH, along with the package
7 containing the application itself. Therefore, ensure that the handler uses the
8 appropriate entries in sys.path.
9
10 Ensure that the handler file for the application has the appropriate
11 permissions:
12
13 chmod u+x examples/CGI/SimpleHandler.py
14
15 --------
16
17 Session storage with CGI:
18
19 The very simple SessionStore class provided in WebStack.Helpers.Session, and
20 used by the WebStack.CGI.Transaction class, requires that a directory be created
21 in the directories of the CGI programs being run with the name
22 "WebStack-sessions". Here are some example commands for doing this:
23
24 cd examples/CGI
25 mkdir WebStack-sessions
26 chown username.groupname WebStack-sessions
27
28 The given "username" and "groupname" correspond to the user and group the Apache
29 server assumes when running.