How do I setup Trac login?

2

2

I've been trying to follow the Trac installation guide, but I've hit a bit of a snag. I can view the default Trac setup just fine, but when I go and try to log in I get this on the page:

Trac Error Authentication information not available. Please refer to the installation documentation. TracGuide — The Trac User and Administration Guide

I've gone to try and follow those links, but no dice.

Here's (AFAIK) the relevant information:

Versions:
Apache 2.2.20 on Ubuntu 11.10
Trac 0.12.2 installed via easy_install

My Trac site lives in /usr/share/www/trac/mysite/ and as a ./result of doing trac-admin mysite/ deploy . the .wsgi file lives at /usr/share/www/trac/cgi-bin/trac.wsgi

Inside my apache2.conf:

<LocationMatch "/trac/[^/]+/login">

    AuthType Digest
    AuthName "trac"
    AuthDigestDomain /trac
    AuthUserFile /usr/share/www/trac/pws/trac.htpasswd
    Require valid-user
</LocationMatch>

LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
LoadModule auth_digest_module /usr/lib/apache2/modules/mod_auth_digest.so

And inside my 000-default:

WSGIScriptAlias /mysite /usr/share/www/trac/cgi-bin/trac.wsgi
<Directory /usr/share/www/trac/cgi-bin>
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
</Directory>

And my trac.htpasswd lives at /usr/share/www/trac/pws/trac.htpasswd

What am I missing?

Wayne Werner

Posted 2011-11-19T14:11:35.863

Reputation: 1 501

Answers

2

Read more about the subject:

Also, LocationMatch and WSGIScriptAlias do not match, you should either set WSGIScriptAlias to /trac /usr... or set LocationMatch to /mysite/[^/]+/login

alexandrul

Posted 2011-11-19T14:11:35.863

Reputation: 962

Turns out that it may have been because I was using Python 3.x for Trac instead of 2.x - when I moved to Python 2.7 the login "just worked". – Wayne Werner – 2012-02-15T13:18:24.433

Glad to hear that. Does it work with the same LocationMatch and WSGIScriptAlias as in the question? – alexandrul – 2012-02-15T15:20:29.303