I was hoping someone with a setup more like your own would reply but I think 
there's a few points in line below.  Just remember I'm on windoze!

On Mon, Feb 14, 2011 at 12:30 AM, Bob <[email protected]> wrote:
> I just install 0.12.2, and am trying to configure authentication.  I
> am using Ubuntu 10.04 LTS, Apache/2.2.14 (Ubuntu), Python 2.6.5, and
> Subversion 1.6.6.  I don't know what version of mod_wsgi I have, but I
> just installed it today...
>
> I want to support multiple Trac projects, each with their own SVN
> repos.
>
> Using trac-admin's deploy command, I have the following trac.wsgi
> file:
>
>  import os
>
>  def application(environ, start_request):
>      if not 'trac.env_parent_dir' in environ:
>          environ.setdefault('trac.env_path', '/home/trac/projects/
> ice')

You are checking for 'trac.env_parent_dir' but then setting 'trac.env_path' so 
you are not getting a parent path... I think you want:

      if not 'trac.env_parent_dir' in environ:
          environ.setdefault('trac.env_parent_dir', '/home/trac/projects')

Personally, I am just blanket setting this as the wsgi file is specific to a 
trac instance and I don't want to configure in the apache conf file, so...

      environ['trac.env_parent_dir'] = '/home/trac/projects'

>      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)
>
> In my Apache2 configuration, I have the following snippit:
>
>    WSGIScriptAlias /trac /home/trac/cgi-bin/trac.wsgi
>
>    <Directory /home/trac/cgi-bin/trac.wsgi>

I think this should be the directory, not the wsgi file:

    <Directory /home/trac/cgi-bin>

>      WSGIApplicationGroup %{GLOBAL}
>      Order deny,allow
>      Allow from all
>    </Directory>
>
>    <Location "/trac/ice">
>      AuthType Basic
>      AuthName "Trac"
>      AuthUserFile /home/trac/projects/ice/conf/htpasswd
>      Require valid-user
>    </Location>
>
> So, my Trac directory is /home/trac, with a subdirectory /home/trac/
> projects that contains separate folders for each project.
>
> With this background, I find three mysteries...
>
> 1. If I enter https://myhost/trac, I do get a basic Trac site, but I
> thought I should get a list of project sites (with only the one
> project, ice, showing up).  Why doesn't the simple list show up, and
> how can I get it to do so?

See above

> 2. If I try to log in there, I get a Trac Error page with
> "Authentication information not available."  I've tried looking at the
> pointers it gives, but I cannot resolve where I am going wrong; there
> are differences between what was generated with 0.12.2 and what the on-
> line examples discuss (presumably from older Trac versions).  What am
> I doing wrong here?

Sorry, I impement server-wide auth using apache...

> 3. If I try https://myhost/trac/ice, which is what I expected to be
> the project's root, I get an "Error: Not Found", "No handler matched
> request to /ice" error page.  What's wrong here?  To be clear, I
> expected to get the Trac project main page, from which I can log on.

Same issue as (1) above...

> Other notes:
>
>  1. I do have a suitable password file, with correct permissions,
> located as indicated.
>
>  2. mod_wsgi shows up in the Apache2 mods-enabled directory, so I
> _think_ it is enabled, but I can't seem to test it - following these
> directions:
>
> To test the setup of Apache, mod_wsgi and Python itself (ie. without
> involving Trac and dependencies), this simple wsgi application can be
> used to make sure that requests gets served (use as only content in
> your .wsgi script):
>
> def application(environ, start_response):
>        start_response('200 OK',[('Content-type','text/html')])
>        return ['<html><body>Hello World!</body></html>']
>
> All I get when I enter an url (https://mysite/wsgi/test.wsgi) to
> access this script is the script itself, so I'm not sure if it is
> broken, or I am not testing it correctly.

(sorry again)

> Help, please!  And of course, Thanks!
> -Bob
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to