Whoops, not variable leakage as not using different interpreters.
Problem is that is the same interpreter and os.environ is process
global and only set once so interfere. Same solution, use SetEnv.
Still better to use daemon mode if can.

Graham

On Oct 28, 6:45 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> 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_E...
>
> 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/andthenhttp://trac.company.com/hass/trac/andthen
> >  go
> > back tohttp://trac.company.com/ims/andrefresh 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to