Installing tramline
===================

Requirements
------------

* It needs Apache 2.0.55 or higher. Apache 2.0.54 and below do *not*
  work due to a bug in mod_proxy filter handling.

* You tend to need mod_proxy installed to proxy requests that come
  into Apache into your underlying appserver. It also works with
  mod_rewrite if you use proxying mode for this ([P]).

* mod_python, with the apache.py file patched so filter is not
  flushed. In mod_python/lib/python/apache.py, comment out
  'filter.flush()' in FilterDispatch.

Apache conf
-----------

* Enable mod_python.

* Then:

  PythonPath "sys.path+['/path/to/tramline/src']"
  PythonInputFilter tramline.core::inputfilter TRAMLINE_INPUT
  PythonOutputFilter tramline.core::outputfilter TRAMLINE_OUTPUT
  SetInputFilter TRAMLINE_INPUT
  SetOutputFilter TRAMLINE_OUTPUT
  PythonOption tramline_path /path/to/tramline-storage

  The last line defines where files should be put on your filesystem.

  Note that if tramline is installed as a Python package into the same
  Python installation as the one mod_python uses, the PythonPath line
  can go away.

Example: Zope
-------------

This is an example configuration of how to run tramline for
*development purposes* with a local Apache and a local Zope 3.

* Make sure you have your Apache configured with 'rewrite' support.
  An example:

  ./configure --prefix=~/lib/apache2 --enable-rewrite

* In addition to what's described in the 'Apache Conf', you need to
  set up your Rewrite rule.  I assume that you have Zope 3 running
  locally on 8080 and Apache running on 8000:

  RewriteEngine On
  RewriteRule ^/(/?.*) \
    http://localhost:8080/++vh++http:localhost:8000/++/$1 [P,L]
