使用Trac+Apache管理多环境,多项目

我使用了Apache+wsgi文件到管理Trac多环境多项目。但出现了多项目的登录信息彼此干扰的问题。现在已经解决了,原来是wsgi不对。

wsgi模板:

项目1配置

import os

os.environ[‘PYTHON_EGG_CACHE’] = ‘/parthto/project1/files/eggs’

import trac.web.main
def application(environ, start_response):
environ[‘trac.env_path’] = ‘/parthto/project1/files/’
return trac.web.main.dispatch_request(environ, start_response)

项目2配置

import os

os.environ[‘PYTHON_EGG_CACHE’] = ‘/parthto/project2/files/eggs’

import trac.web.main
def application(environ, start_response):
environ[‘trac.env_path’] = ‘/parthto/project2/files/’
return trac.web.main.dispatch_request(environ, start_response)

 

参考:http://trac.edgewall.org/wiki/TracModWSGI

Leave a Reply

Your email address will not be published. Required fields are marked *