On Monday, December 5, 2016 at 6:56:29 PM UTC-8, [email protected] wrote: > > Hi, > > I'd like to have apache and mod_wsgi serve one trac instance which in turn > would serve multiple projects. I've read the TracInstall and TracModWsgi > doc ad nauseam, tried to tweak the example and deploy-generated wsgi > drivers to no avail. > > I did succeed in having an environment served (at > http://my.server/trac/foo) but failed to have the project lists correctly > displayed when GETting http://my.server/trac , which constantly fails > with the following error : > > Available Projects > > - cgi-bin: *Error* > (No Trac environment found at /srv/trac/cgi-bin [Errno 2] No such file > or directory: '/srv/trac/cgi-bin/VERSION') > - Foo > > Here is my present apache configuration : > > > > WSGIScriptAlias /trac /srv/trac/cgi-bin/saule.wsgi > > <Directory /srv/trac/cgi-bin> > WSGIApplicationGroup %{GLOBAL} > #<IfModule mod_authz_core.c> > # Require all granted > #</IfModule> > </Directory> > <Location /trac> > AuthType Basic > AuthName "trac" > AuthUserFile /etc/apache2/auth/users > AuthGroupFile /etc/apache2/auth/groups > Require group dev > > </Location> > > > > And this is my wsgi driver (I've tried many other configuration, this is > the best I could achieve): > > #!/usr/bin/python > # -*- coding: utf-8 -*- > > import os > > def application(environ, start_request): > environ.setdefault('trac.env_parent_dir', '/srv/trac') > if not 'trac.env_parent_dir' in environ: > environ.setdefault('trac.env_path', '/srv/trac') > if 'PYTHON_EGG_CACHE' in environ: > os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE'] > elif 'trac.env_path' in environ: > os.environ['PYTHON_EGG_CACHE'] = \ > os.path.join(environ['trac.env_path'], '.egg-cache') > elif 'trac.env_parent_dir' in environ: > os.environ['PYTHON_EGG_CACHE'] = \ > os.path.join(environ['trac.env_parent_dir'], '.egg-cache') > from trac.web.main import dispatch_request > return dispatch_request(environ, start_request) > > > What am I missing there? > > > Thanks in advance, > > phep >
You trac.env_parent_dir should contain only Trac environments, whereas you directory (/srv/trac) also contains cgi-bin. One way to fix this is to move your Trac environments to /srv/trac/envs and modify trac.env_parent_dir accordingly. - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
