Configuring Apache:

To configure applications without authenticators, use the config.py script
in tools/Apache to set up mod_python applications. For example:

python tools/Apache/config.py \
    CGI \
    /home/paulb/Software/Python/WebStack/examples/CGI/CookiesApp.py \
    /etc/apache2/sites-available \
    cookies \
    /cgi/cookies

This script can also be used to configure mod_python applications.

--------

The manual way:

Declare the script in httpd.conf or equivalent Web server configuration file.
For example:

ScriptAlias /cgi/simple "/home/paulb/Software/Python/WebStack/examples/CGI/SimpleHandler.py"

The WebStack package must reside on the PYTHONPATH, along with the package
containing the application itself. Therefore, ensure that the handler uses the
appropriate entries in sys.path.

Ensure that the handler file for the application has the appropriate
permissions:

chmod u+x examples/CGI/SimpleHandler.py

--------

Session storage with CGI:

The very simple SessionStore class provided in WebStack.Helpers.Session, and
used by the WebStack.CGI.Transaction class, requires that a directory be created
in the directories of the CGI programs being run with the name
"WebStack-sessions".  Here are some example commands for doing this:

  cd examples/CGI
  mkdir WebStack-sessions
  chown username.groupname WebStack-sessions

The given "username" and "groupname" correspond to the user and group the Apache
server assumes when running.
