Edgewall Software

Changes between Version 115 and Version 116 of TracModPython


Ignore:
Timestamp:
Aug 3, 2007, 1:26:25 PM (17 years ago)
Author:
shepting@…
Comment:

Added XML-style highlighting to .conf samples to simplify reading.

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython

    v115 v116  
    2222You can test your mod_python installation by adding the following to your httpd.conf.  You should remove this when you are done testing for security reasons. Note: mod_python.testhandler is only available in mod_python 3.2+.
    2323{{{
     24#!xml
    2425<Location /mpinfo>
    2526   SetHandler mod_python
     
    3031A simple setup of Trac on mod_python looks like this:
    3132{{{
     33#!xml
    3234<Location /projects/myproject>
    3335   SetHandler mod_python
     
    4446Creating password files and configuring authentication works similar to the process for [wiki:TracCgi#AddingAuthentication CGI]:
    4547{{{
     48#!xml
    4649<Location /projects/myproject/login>
    4750  AuthType Basic
     
    6366
    6467{{{
     68#!xml
    6569<Location /trac/>
    6670  SetHandler mod_python
     
    8387
    8488{{{
     89#!xml
    8590<Location /trac/>
    8691  SetHandler mod_python
     
    115120If the Trac installation isn't installed in your Python path, you'll have to tell Apache where to find the Trac mod_python handler  using the `PythonPath` directive:
    116121{{{
     122#!xml
    117123<Location /projects/myproject>
    118124  ...
     
    128134The Trac mod_python handler supports a configuration option similar to Subversion's `SvnParentPath`, called `TracEnvParentDir`:
    129135{{{
     136#!xml
    130137<Location /projects>
    131138  SetHandler mod_python
     
    140147If you don't want to have the subdirectory listing as your projects home page you can use a
    141148{{{
     149#!xml
    142150<LocationMatch "/.+/">
    143151}}}
     
    147155You can also use the same authentication realm for all of the projects using a `<LocationMatch>` directive:
    148156{{{
     157#!xml
    149158<LocationMatch "/projects/[^/]+/login">
    150159  AuthType Basic
     
    161170
    162171{{{
     172#!xml
    163173<VirtualHost * >
    164174    DocumentRoot /var/www/myproject
     
    187197In general, if you get server error pages, you can either check the Apache error log, or enable the `PythonDebug` option:
    188198{{{
     199#!xml
    189200<Location /projects/myproject>
    190201  ...
     
    256267If the formatting of the Trac pages look weird chances are that the style sheets governing the page layout are not handled properly by the web server. Try adding the following lines to your apache configuration:
    257268{{{
     269#!xml
    258270Alias /myproject/css "/usr/share/trac/htdocs/css"
    259271<Location /myproject/css>
     
    268280If you want to run Trac fully under https you might find that it tries to redirect to plain http. In this case just add the following line to your apache configuration:
    269281{{{
     282#!xml
    270283<VirtualHost * >
    271284    DocumentRoot /var/www/myproject