It would be great if you could post in-line or at the bottom on this list, it makes it so much easier to follow the problem. I have re-ordered and answered below...
> On 24 Jan 2014, at 1:14 am, Cooke, Mark > <[email protected]> wrote: > > >> -----Original Message----- > >> From: [email protected] On Behalf Of rl > >> Sent: 23 January 2014 09:44 > >> > >> I followed a standard trac install and created a project with > >> trac-admin /opt/trac/myproject initenv > >> > >> if I start the embedded server with trace -p <someport> > >> /opt/trac/myproject browsing to http://webserver:<someport> > >> I get a menu of sorts with the heading "available Projects" > >> and beneath that a hyperlink to the name I gave myproject. > > > > That is using a trac "parent" directory... > > > >> Using apache I setup a ScriptAlias of /trac to point at > >> /opt/trac/myproject/cgi-bin/trac.fcgi after installing and > >> setting up fcgi itself. When I browse to > >> http://webserver/trac I get the home page of my project > >> instead of the menu of projects produced by tracd. > > > > ...whereas your fcgi configuration is almost certainly > using an environment, not a parent. Post your fcgi here for > more concrete help but see also:- > > > http://trac.edgewall.org/wiki/TracFastCgi#alternativeenvironmentsetup > > > >> I'd like to know why this is the case and how to configure > >> the tracd behaviour via the apache interface? > >> > >> Many thanks > >> > >> r. > > > > ~ Mark C > > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Rolf Loudon > Sent: 23 January 2014 20:36 > To: [email protected] > Subject: Re: [Trac] different view via tracd and apache > > Hi > > Thanks for responding. > > This is my trac.fcgi located in /opt/trac/cgi-bin/ and was > generated using the deploy option to trac-admin detailed here > http://trac.edgewall.org/wiki/TracInstall#DeployingTrac > > try: > import os > import pkg_resources > if 'TRAC_ENV' not in os.environ and \ > 'TRAC_ENV_PARENT_DIR' not in os.environ: > os.environ['TRAC_ENV'] = '/opt/trac/myproject' Note that the line above sets `TRAC_ENV`, did you have a look at the link I posted? Trac uses one of `TRAC_ENV` and `TRAC_ENV_PARENT_DIR` to work out what to serve. You want the parent version. > if 'PYTHON_EGG_CACHE' not in os.environ: > if 'TRAC_ENV' in os.environ: > egg_cache = os.path.join(os.environ['TRAC_ENV'], '.egg-cache') > elif 'TRAC_ENV_PARENT_DIR' in os.environ: > egg_cache = os.path.join(os.environ['TRAC_ENV_PARENT_DIR'], > '.egg-cache') > pkg_resources.set_extraction_path(egg_cache) You should also check out the paths set above to make sure they are correct for your setup. > from trac.web import fcgi_frontend > fcgi_frontend.run() > except SystemExit: > raise > except Exception, e: > print 'Content-Type: text/plain\r\n\r\n', > print 'Oops...' > print > print 'Trac detected an internal error:' > print > print e > print > import traceback > import StringIO > tb = StringIO.StringIO() > traceback.print_exc(file=tb) > print tb.getvalue() > > If I were to re-generate this so that the apache config had > the Script Alias /trac /opt/trac/cgi-bin/trac.fcgi setting > how would I specify the paths to deploy so that > http://webserver/trac goes to the parent, as per the > behaviour previously cited with tracd -p < someport> > /opt/trac/myproject? Use the parent env configuration option noted above. More info in the `TracFastCgi#alternativeenvironmentsetup` link provided previously! ~ Mark C > Regards > > rolf. > -- 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 http://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/groups/opt_out.
