[mod_python] mod_python on / and authentication on /login (using trac)

Graham Dumpleton graham.dumpleton at gmail.com
Wed Mar 21 16:38:21 EST 2007

On 22/03/07, Axel Thimm <Axel.Thimm at atrpms.net> wrote:
> Hi,
> I'm fighting against a strange issue with a setup that involves having
> mod_python on Location "/" and authenticating only on certain URLs
> like /login. This is for example the typical setup for a trac
> dedicated site, see
> http://trac.edgewall.org/ticket/3821
> for the background. It doesn't happen if mod_python/trac is hooked on
> "/trac" and the authentication on "/trac/login".
> The combinations that are known to exhibit or not this error are
> httpd modpython trac     works
> 2.2.3 3.6.20    0.10     no
> 2.2.2 3.3.1     0.10.3   no
> 2.2.3 3.2.8 yes
> 2.2.2 3.2.10    0.10.3   no
> Any ideas what's going wrong or how I could debug this further?

I'm not surprised it doesn't work with mod_python 3.6.20 as no such
version exists.

Have you tried setting your DocumentRoot to somewhere outside of your
Trac instance. I'd suggest doing that what would be a bad idea to
start with as the presence of directories/files in there can sometimes
interfere with Apache's matching algorithms for locations. Set it
instead to some empty directory elsewhere if you aren't going to serve
any static files out of document root.

Also, have you tried changing the order of the two Location
directives, ie., those for '/' and '/login' so the later is actually
first. It shouldn't in practice matter, but some Apache configuration
entries are order dependent.


More information about the Mod_python mailing list