Why are you using both os.environ and SetEnv at same time? You shouldn't do that. Use just SetEnv and make sure you are setting the correct variables. At the moment you are setting trac.env_parent_dir for both when you should be using trac.env_path for one in line with what os.environ variables you were trying to use.
For why you are having problems when using os.environ read: http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Application_Environment_Variables where it explicitly mentions Trac as an example of variable leakage. Also read: http://code.google.com/p/modwsgi/wiki/IntegrationWithTrac where it suggests you use separate daemon process groups and not embedded mode if distinct instances, especially where they may have no common set of plugins etc. At the moment you are mixing two instances in one interpreter of process and that may cause other conflicts in addition to your current problem where plugin sets and dependencies are different. Graham On Oct 27, 9:44 pm, chris <henders...@gmail.com> wrote: > I am having trouble setting up wgsi with multiple projects. > > I have multiple projects underhttp://trac.company.com/ims/trac > (/var/sites/ims/trac/{math,compsci,hr} directories) - so when I browse > tohttp://trac.company.com/ims/trac, > I get a listing of all the projects from where I click on individual > project's trac page or I can browse to the project's page directly > (eg.http://trac.company.com/ims/trac/compsci) > > I also have another project under /var/sites/hass/trac (http:// > trac.company.com/hass/trac/) so when I browse to that URL I land on > HASS' trac page directly (because there's only one project here) > > The issue: when I visithttp://trac.company.com/ims/and > thenhttp://trac.company.com/hass/trac/and then go > back tohttp://trac.company.com/ims/and refresh my browser, I get the > page fromhttp://trac.company.com/hass/trac/. So I must be doing > something wrong. > > Here is my configuration details: > > /etc/http/conf.d/trac.conf: > > WSGIScriptAlias /ims/trac /var/sites/ims/trac/ims.wsgi > <Directory /var/sites/ims/trac/> > WSGIApplicationGroup %{GLOBAL} > SetEnv trac.env_parent_dir /var/sites/ims/trac/ > Order allow,deny > Allow from all > </Directory> > > WSGIScriptAlias /hass/trac /var/sites/hass/trac/hass.wsgi > <Directory /var/sites/hass/trac/> > WSGIApplicationGroup %{GLOBAL} > SetEnv trac.env_parent_dir /var/sites/hass/trac/ > Order allow,deny > Allow from all > </Directory> > > /var/sites/ims/trac/ims.wsgi file: > > #!/usr/bin/python > > import os > > os.environ['TRAC_ENV_PARENT_DIR'] = '/var/sites/ims/trac/' > os.environ['PYTHON_EGG_CACHE'] = '/tmp/imseggs/' > > import trac.web.main > application = trac.web.main.dispatch_request > > /var/sites/hass/trac/hass.wsgi file: > > #!/usr/bin/python > > import os > > os.environ['TRAC_ENV_DIR'] = '/var/sites/hass/trac/' > os.environ['PYTHON_EGG_CACHE'] = '/tmp/hasseggs/' > > import trac.web.main > application = trac.web.main.dispatch_request > > I have done my Google search and read the archive regarding this but I > am not too clear. > > -mod_wsgiwas compiled from source and is version 2.6 > - Everything is running over HTTP (plain-text) > - Everything is UID:GID apache:apache > - All .wsgi scripts are set to 755 permission > - I have LDAP authentication but that part is working just fine. > - I am planning to add more projects under /var/sites/ but need to > solve this issue first. > > Thanks for help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to trac-users@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---