Here is the Trac bug for future reference. They did the same solution
as me.

http://trac.edgewall.org/ticket/2371

On Aug 4, 3:28 am, Marc <[email protected]> wrote:
> Yes the problem is that apache is not prompting the login form in /
> login. It just goes straight to Trac.
>
> I have fixed it now, I've set the logging level to debug and saw this
>
> [Tue Aug 04 03:21:06 2009] [debug] mod_deflate.c(632): [client myip]
> Zlib: Compressed 4133 to 1507 : URL /include/error.php, 
> referer:http://myproject.url.com/
>
> I removed this line from my apache conf:
>
> ErrorDocument 401 /include/error.php?401
>
> It was my custom error handler.
>
> What I did now is set: ErrorDocument 401 default inside the <Location /
> login>
>
> Everything works now, anybody able to explain the mechanism behind the
> 401 with Trac?
>
> Thanks!
>
> On Aug 3, 1:54 pm, Erik Bray <[email protected]> wrote:
>
>
>
> > On Sat, Aug 1, 2009 at 10:56 PM, Marc<[email protected]> wrote:
>
> > > Here is my VirtualHost configuration
>
> > > <VirtualHost *:80>
> > >    ServerName myproject.host.com
> > >    # We can't use Location / because then /login also gets sent to
> > > mod_python
> > >    <Location />
> > >        SetHandler mod_python
> > >        PythonInterpreter main_interpreter
> > >        PythonHandler trac.web.modpython_frontend
> > >        PythonOption TracEnv /var/trac/myproject/
> > >        PythonOption TracUriRoot /
> > >        SetEnv PYTHON_EGG_CACHE /var/trac/.egg-cache/
> > >    </Location>
>
> > >    <Location /login>
> > >        AuthType Basic
> > >        AuthName "Trac (Subversion) access"
> > >        AuthUserFile /etc/apache2/svn.passwd
> > >        Require valid-user
> > >    </Location>
> > > </VirtualHost>
>
> > > The problem is that the Login location does not work. Trac' (NOT
> > > mod_python), hijacks everything and sends it to itself. Even setting
> > > SetHandler None in <Location /login> does nothing.
>
> > > The famous "Authentication information not available" message appears.
> > > Apache never is able to handle the <Location /login>, Trac hijacks it.
>
> > > Has anybody ever solved this long-standing issue? It seems to be a
> > > problem with Trac, because other mod_python apps like Django use the
> > > SetHandler None solution and it works fine.
>
> > > Using DocumentRoot does no difference whatsoever.
>
> > > Thanks.
>
> > If I understand correctly, you *want* Trac to handle /login.  Trac has
> > a request handler for /login that handles generating the Trac cookie
> > if authentication information is provided by the server.  Otherwise
> > Apache is just authenticating /login and then doing nothing at that
> > location.
--~--~---------~--~----~------------~-------~--~----~
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