Matthew, thanks a lot, it works now!

On 30 jan, 19:24, Matthew Caron <matt.ca...@sixnet.com> wrote:
> On 01/30/2012 01:09 PM, simo wrote:
>
> >> If it's new, you may need to sudo updatedb.
>
> > Did it but it doesn't change anything !
>
> Then it's not in any other place, and that could be part of your issue.
> Where are all your trac "guts"? The attachments, trac.ini, etc? Without
> them, this won't work.
>
> >> Firstly, it doesn't look like you turned on the RewriteEngine, so those
> >> lines aren't doing anything, and I'd leave them commented out until you
> >> have the rest of it working.
> > Yes, I turned it on
>
> Okay.
>
> >> Also, why are you bothering with fcgi? wsgi is faster, and it's actually
> >> what I'm using... I just have old fcgi config around.
>
> > Ok for me to use wsgi. I installed and enabled the apache module.
> > I had a glance on that page (http://trac.edgewall.org/wiki/TracModWSGI
> > ), but I'm not familiar with python environnement and don't really
> > know what to do, specifically regarding the script.
>
> > I'm willing to follow your instructions.
>
> Okay. firstly, I apologize - I pasted the wrong file originally. I sent
> the .wsgi script, not the .fcgi script. This is the .fcgi script:
>
> {{{
> (mattc@eng) /opt/trac/eng/static-htdocs/cgi-bin$ less trac.fcgi
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
> #
> # Copyright (C) 2003-2009 Edgewall Software
> # Copyright (C) 2003-2004 Jonas Borgstr m <jo...@edgewall.com>
> # All rights reserved.
> #
> # This software is licensed as described in the file COPYING, which
> # you should have received as part of this distribution. The terms
> # are also available athttp://trac.edgewall.org/wiki/TracLicense.
> #
> # This software consists of voluntary contributions made by many
> # individuals. For the exact contribution history, see the revision
> # history and logs, available athttp://trac.edgewall.org/log/.
> #
> # Author: Jonas Borgstr m <jo...@edgewall.com>
>
> 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/eng'
>      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)
>      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()
>
> }}}
>
> All that said, with wsgi turned on, do:
>
> trac-admin <env> deploy <dir>
>
> and that will do put all the right bits specified by the trac instance
> in <env> into the directory <dir>
>
> Here is my httpd.conf, somewhat munged to remove stuff which is specific
> to my company. Comments are in <<< comment >>> so you know to
> replace/remove them.
> {{{
> <VirtualHost *:>
>      ServerName <<< server name >>>
>      ServerAlias trac
>
>      # Serve (relatively) static chrome files directly from the
>      # filesystem. Use trac-admin's deploy command to create the
>      # static-htdocs directory:
>      Alias /trac/chrome <<< base trac path >>>/static-htdocs/htdocs
>      <Directory "<<< base trac path >>>/static-htdocs/htdocs">
>          Order allow,deny
>          Allow from all
>      </Directory>
>
>      WSGIDaemonProcess trac user=www-data group=www-data threads=50
>      WSGIScriptAlias /trac <<< path to wsgi file created by deploy >>>
>      RewriteEngine on
>
>      # RewriteLog /var/log/apache2/rewrite.log
>      # RewriteLogLevel 9
>
>      # It seems mod_fcgid/mod_wsgi includes _only_ the environment values
>      # specifically set below, so we do need to set LANG here explicitly.
>      DefaultInitEnv LANG "en_US.UTF-8"
>      DefaultInitEnv TRAC_ENV "<<< your path to base trac location here >>>"
>
>      # Redirect bare requests to /trac
>      RewriteCond %{REQUEST_URI} ^/$
>      RewriteRule ^(.*)$ <<< your URL here >>>/trac%{REQUEST_URI}
>
>      <Directory /<<<your path to base trac location here
>  >>>/static-htdocs/cgi-bin/>
>          WSGIProcessGroup trac
>          WSGIApplicationGroup %{GLOBAL}
>          Order deny,allow
>          Allow from all
>      </Directory>
>
>      <Location "/trac">
>            SetEnv TRAC_ENV "<<< your path to base trac location here >>>"
>      </Location>
>
>      <Location "/trac/login">
>        <<< your login credential stuff goes here >>>
>      </Location>
> </VirtualHost>
>
> }}}
>
> --
> Matthew Caron
> Build Engineer
> Sixnet |www.sixnet.com
> O +1 518 877 5173 Ext. 138
> F +1 518 602 9209
> matt.ca...@sixnet.com

-- 
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