
To install Quixote, first you have to edit config.py, and then install
the 'quixote' Python package.  Next, you have to put the CGI script
where it's executable by your Web server, and configure the Web server
as required.

Configuring the quixote package
===============================

First, edit config.py to your taste.  In config.py you can specify
if tracebacks should be e-mailed, and to which e-mail address, whether
to reload Python code automatically, and various other settings; see
the comments in config.py for the details.

The most important configuration setting is ROOT_PACKAGE, the name of
the root package that will contain the Web-related code and template
files.


Installing the quixote package
==============================

Quixote is packaged using the Distutils; if you're running Python
1.5.2, you'll need to install Distutils first, by downloading the code
from http://www.python.org/sigs/distutils-sig/ and following the
instructions.  If you're using Python 1.6, the Distutils are already
included.  

Once the Distutils are available, simply run "python setup.py install".

The 'quixote' package and its subpackages will be copied into the
appropriate directory for site-specific packages.


Installing the CGI script
=========================

Copy quixote.cgi to the CGI directory for your Web server, and be sure
that it's executable.  Consult your Web server documentation to find
out how to set up a CGI directory.

Further server configuration
============================

quixote.cgi can use FastCGI for improved performance, by running a
single long-lived process instead of starting a new process on every
hit.  This step is almost mandatory for production use since Quixote
is currently impractically slow to be run using regular CGI
invocation.  (We hope to fix this eventually.)

Consult your Web server's documentation to find out if it supports
FastCGI.  If you're using Apache, you can compile it with mod_fastcgi
enabled, and then the following snippets can be added to your
httpd.conf file:

# FastCGI configuration directives for Quixote
FastCgiIpcDir /www/httpd/var
FastCgiServer /www/cgi-bin/quixote.fcgi -socket fcgi.sock 
AddHandler fastcgi-script .fcgi

Rename the quixote.cgi script to quixote.fcgi, so Apache can recognize
the different extension.  It's also possible to add a shorthand form
for accessing Quixote using mod_rewrite.  The following directive
makes http://hostname/q/x/y/z equivalent to
http://hostname/cgi-bin/quixote/x/y/z.

# Rewrite rule to make a shorthand for access to Quixote
RewriteRule ^/q/(/$|.*) /www/cgi-bin/quixote.fcgi$1 [t=fastcgi-script,l]
RewriteEngine on



