On Thursday, April 28, 2016 at 12:57:57 PM UTC-7, Holger Bruenjes wrote:
>
> Am 2016-04-27 um 22:54 schrieb RjOllos: 
> > 
> > 
> > On Wednesday, April 27, 2016 at 1:24:16 PM UTC-7, Holger Bruenjes wrote: 
>
> > The first "Location" section looks strange. Try moving the 
> > WSGIApplicationGroup directive into the "Directory" section and removing 
> > the first "Location" section. 
>
> when I switch the first location to 
>
>
> <Location ~ "/*(?!login)"> 
>     WSGIApplicationGroup %{GLOBAL} 
>     AuthType Digest 
>     AuthName "eis-home" 
>     AuthDigestDomain eis-home 
>     AuthDigestProvider file 
>     AuthUserFile /var/lib/repo/trac/eis-home.htpasswd 
>     Require valid-user 
> </Location> 
>

You only need the regex in the Location directive if your base_path is 
anything other than "/", otherwise you should be able to use "/login". For 
your case, it sounds like Trac is running at http://subdomain.domain.com/, 
in which case I think the problem is that you used a regular expression 
character in the directive:
<Location '^/login'> 

You either need to use:
<Location ~ '^/login'> 

or better,
<LocationMatch '^/login'> 

Even more simply, I think you can just use:
<Location '/login'> 

On the other hand, If your base_path includes the project name, you can 
just hard-code the name of the project in the base path unless you are 
trying to run multiple Trac sites on the subdomain. For example:
<Location '/eis-home/login'> 

If you are running multiple sites on a subdomain, you are better off using 
a LocationMatch directive, like described on the Trac ModWSGI page, which 
if your project is found at /project/eis-home, would look like:

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

> the authentication window pop up and I can enter username and 
> password, trac come up and sayed 'logged in as $user' 
>

Are you saying that it's working now? If so, that's great. The only thing, 
it sounds like your configuration is still a bit more complex than it needs 
to be.

- Ryan

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to