-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Virtual Dust skrev 21-04-2008 08:27:
| Eirik Schwenke wrote:
|> Does the webserver/webclient prompt for http-login on the url?
|>
| No, there is no prompt at all.
|> As I understand it, in the standard configuration, with basic http-auth
|> enabled, and python running through mod_python, trac acquires the 
http-username
|> from apache.
|>
|> Still, the locationmatch looks correct to me, which leaves an error in the
|> passwd-file name -- as apache should refuse to start if you're missing
|> mod_authn_file in the apache config.
|>
| if the passwd-file was not found (or in the wrong format), apache would
| prompt for authentication anyway, but never success.
|> Anything in the apache error.log ?
|>
|> You could try setting the log_level to DEBUG in trac.ini also -- might shed
|> some light on what goes wrong, and when.
|>
|
| I made some tests. At first, I explicitly set only one project:
| ...
| <Location /test>
| ...
| PythonOption TracEnv /home/httpd/trac-env/test
| ...
| <LocationMatch /test/login>
| ...
|
| With that, apache prompts for authentication and login process completes
| succesfully.
| Next, without reloading my browser, i restored my previous apache
| configuration and restarted the server : i reloaded the page in the
| browser. Login information was kept, and everything worked fine. But
| when I restarted the browser... No prompt, only the same error as
| ever... There is no relevant information in the log (Debug level is
| set). Only a WARNING: 500 Trac Error.
|
| This error persists even with an explicit <LocationMatch /test/login> in
| place of the regexp.

You have diagnosed the problem -- your apache config is wrong, and does not
demand/request authentication from the client.

But apache is successfully forwarding the request username to trac, so once you
figure out what's wrong with the LocationMatch-stuff, you should be home free.

| Note that I did this test with several browsers (firefox 2, firefox 3,
| lynx, opera), to be sure it was not a bug in it.

Unfortunately that's redundant in this case. For help debugging problems like
this I recommend the firefox liveheaders extention:

~ http://livehttpheaders.mozdev.org/

It's more convenient that just telneting to port 80 and trying to remember how
to speak http/1.1 fluently -- if not as much fun ;-)

| I will try with Trac 0.10 this afternoon or tomorrow to see if the
| problem may come from Trac 0.11b2.

It most likely won't - The problem is with apache not requesting authentication.

| I keep you informed.

I just now tested with the following in my local apache-config:

~ <LocationMatch "/[^/]+/login$">
~      AuthType Basic
~      AuthName "Projects"
~      AuthUserFile /home/httpd/trac-env/trac.htpasswd
~      Require valid-user
~  </LocationMatch>

And it demanded login-credentials for all /foo/bar/login-urls i threw at it.

(Note the trailing $ didn't make any difference wrt wether or not the section
worked, but it's best to be reasonably specific about LocationMatch-directives,
in case they're included in a complex apache-config).

I'd double-check my apache-config for typos and see if the apache error.log has
anything helpful to add -- because as far as I can understand the code you
posted earlier *should* work.


Best regards,

- --
~ .---.  Eirik Schwenke <[EMAIL PROTECTED]>
( NSD ) Harald HÃ¥rfagresgate 29            Rom 150
~ '---'  N-5007 Bergen            tlf: (555) 889 13

~  GPG-key at pgp.mit.edu  Id 0x8AA3392C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIDJRfxUW7FIqjOSwRAu02AKDM0eL7rERAWXfcuJfBwtd64/D9gQCgge0A
A2nkCdrVfZO8o3rA5NXoj8Y=
=cxZd
-----END PGP SIGNATURE-----

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to