close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 1 and Version 2 of TracModPython


Ignore:
Timestamp:
Jul 14, 2008, 10:28:16 AM (13 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracModPython

    v1 v2  
    33
    44Trac supports [http://www.modpython.org/ mod_python], which speeds up Trac's response times considerably, especially compared to [TracCgi CGI], and permits use of many Apache features not possible with [wiki:TracStandalone tracd]/mod_proxy.
     5
     6These instructions are for Apache 2; if you are still using Apache 1.3, you may have some luck with [wiki:TracModPython2.7 TracModPython2.7].
    57
    68== Simple configuration ==
     
    4749
    4850The option '''`TracUriRoot`''' may or may not be necessary in your setup. Try your configuration without it; if the URLs produced by Trac look wrong, if Trac does not seem to recognize URLs correctly, or you get an odd "No handler matched request to..." error, add the '''`TracUriRoot`''' option.  You will notice that the `Location` and '''`TracUriRoot`''' have the same path.
     51
     52The options available are
     53{{{
     54    # For a single project
     55    PythonOption TracEnv /var/trac/myproject
     56    # For multiple projects
     57    PythonOption TracEnvParentDir /var/trac/myprojects
     58    # For the index of multiple projects
     59    PythonOption TracEnvIndexTemplate /srv/www/htdocs/trac/project_list_tepmlate.html
     60    # A space delimitted list, with a "," between key and value pairs.
     61    PythonOption TracTemplateVars key1,val1 key2,val2
     62    # Useful to get the date in the wanted order
     63    PythonOption TracLocale en_GB.UTF8
     64    # See description above       
     65    PythonOption TracUriRoot /projects/myproject
     66}}}
    4967
    5068=== Configuring Authentication ===
     
    203221For a virtual host that supports multiple projects replace "`TracEnv`" /var/trac/myproject with "`TracEnvParentDir`" /var/trac/
    204222
     223Note: !DocumentRoot should not point to your Trac project env. As Asmodai wrote on #trac: "suppose there's a webserer bug that allows disclosure of !DocumentRoot they could then leech the entire Trac environment".
     224
    205225== Troubleshooting ==
    206226
     
    216236For multiple projects, try restarting the server as well.
    217237
     238=== Expat-related segmentation faults === #expat
     239
     240This problem will most certainly hit you on Unix when using Python 2.4.
     241In Python 2.4, some version of Expat (an XML parser library written in C) is used,
     242and if Apache is using another version, this results in segmentation faults.
     243As Trac 0.11 is using Genshi, which will indirectly use Expat, that problem
     244can now hit you even if everything was working fine before with Trac 0.10.
     245
     246See Graham Dumpleton's detailed [http://www.dscpl.com.au/wiki/ModPython/Articles/ExpatCausingApacheCrash explanation and workarounds] for the issue.
     247
    218248=== Form submission problems ===
    219249
     
    254284Pay attention to the version of the installed mod_python and sqlite packages. Ports have both the new and old ones, but earlier versions of pysqlite and mod_python won't integrate as the former requires threaded support in python, and the latter requires a threadless install.
    255285
    256 If you compiled and installed apache2, apache wouldn´t support threads (cause it doesn´t work very well on FreeBSD). You could force thread support when running ./configure for apache, using --enable-threads, but this isn´t recomendable.
     286If you compiled and installed apache2, apache wouldn´t support threads (cause it doesn´t work very well on FreeBSD). You could force thread support when running ./configure for apache, using --enable-threads, but this isn´t recommendable.
    257287The best option [[http://modpython.org/pipermail/mod_python/2006-September/021983.html seems to be]] adding to /usr/local/apache2/bin/ennvars the line
    258288