[Trac-tickets] [The Trac Project] #2713: Enhance Mod Python documentation regarding multiple Trac instances in a single virtualhost

The Trac Project noreply at edgewall.com
Thu Feb 2 08:10:03 CST 2006


#2713: Enhance Mod Python documentation regarding multiple Trac instances in a
single virtualhost
-------------------------------------+--------------------------------------
 Reporter:  gergely.kis at siemens.com  |       Owner:  cmlenz       
     Type:  enhancement              |      Status:  new          
 Priority:  normal                   |   Milestone:               
Component:  mod_python frontend      |     Version:  0.9.3        
 Severity:  normal                   |    Keywords:  documentation
-------------------------------------+--------------------------------------
 If you use multiple Trac instances (e.g. different trac versions) in a
 single virtualhost, then you will need to add a
 {{{
 PythonInterpreter  myproject_python
 }}}

 directive into the Location section. For example:
 {{{
 <Location /projects/myproject1>
    SetHandler mod_python
    PythonHandler trac.web.modpython_frontend
    PythonOption TracEnv /var/trac/myproject
    PythonOption TracUriRoot /projects/myproject
    PythonPath "sys.path + ['/path/to/trac-version1/lib/python2.3/site-
 packages']"
    PythonInterpreter myproject1_python
 </Location>

 <Location /projects/myproject2>
    SetHandler mod_python
    PythonHandler trac.web.modpython_frontend
    PythonOption TracEnv /var/trac/myproject
    PythonOption TracUriRoot /projects/myproject
    PythonPath "sys.path + ['/path/to/trac-version2/lib/python2.3/site-
 packages']"
    PythonInterpreter myproject2_python
 </Location>
 }}}

 The value of PythonInterpreter does not matter as long as it is unique in
 a virtual host.

 The idea was taken from the Django documentation:
 http://www.djangoproject.com/documentation/modpython/

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2713>
The Trac Project <http://trac.edgewall.com/>


More information about the Trac-Tickets mailing list