Eirik Schwenke wrote: > 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.
Let's do some magics... ~ DocumentRoot /home/httpd/projects ~ ~ <Location /> ~ SetHandler mod_python ~ PythonHandler trac.web.modpython_frontend ~ PythonOption TracEnvParentDir /home/httpd/trac-env ~ PythonOption TracUriRoot / ~ SetEnv PYTHON_EGG_CACHE /home/httpd/.egg-cache ~ PythonDebug On ~ </Location> ~ ~ <LocationMatch "/[^/]+/login$"> ~ AuthType Basic ~ AuthName "Projects" ~ AuthUserFile /home/httpd/trac-env/trac.htpasswd ~ Require valid-user ~ </LocationMatch> This is the initial configuration : i'm not asked for authentication for http://projects.arcanes.home/foo/login Now... ~ DocumentRoot /home/httpd/projects ~ * <Directory /home/httpd/projects/> ~ SetHandler mod_python ~ PythonHandler trac.web.modpython_frontend ~ PythonOption TracEnvParentDir /home/httpd/trac-env ~ PythonOption TracUriRoot / ~ SetEnv PYTHON_EGG_CACHE /home/httpd/.egg-cache ~ PythonDebug On * </Directory> ~ ~ <LocationMatch "/[^/]+/login$"> ~ AuthType Basic ~ AuthName "Trac Projects Authentication" ~ AuthUserFile /home/httpd/trac-env/trac.htpasswd ~ Require valid-user ~ </LocationMatch> (changed lines start with *) And... All is fine !! It seams that the Apache server deals with the <Location /> directive in a particular way. I don't know if it's a bug (just in my version ?), though. Maybe there is a real reason for that. Thanks for your help ! Raphaƫl. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---