mod_perl custom configuration directives don't work when placed in .htaccess and there is <Location>

Posted by al_l_ex on Server Fault See other posts from Server Fault or by al_l_ex
Published on 2012-12-08T14:40:23Z Indexed on 2012/12/10 11:10 UTC
Read the original article Hit count: 221

Filed under:
|
|

I'm trying to complete Redmine's feature request #2693: Use Redmine.pm to authenticate for any directory (1). I have not much knowledge on all these things and need help. Redmine uses mod_perl module Redmine.pm for authentication & authorization. This module defines several custom configuration directives. I've successfully modified patch from (1) and it works when all config is in <Location>:

<Location /digischrank/test>
        AuthType basic
        AuthName "Digischrank Test" 
        Require valid-user
        PerlAccessHandler Apache::Authn::Redmine::access_handler
        PerlAuthenHandler Apache::Authn::Redmine::authen_handler
        RedmineDSN "DBI:mysql:database=SomedaTaBAse;host=localhost" 
        RedmineDbUser "SoMeuSer" 
        RedmineDbPass "SomePaSS" 
        RedmineProject "digischrank" 
</Location>

But when I move one of these directives (RedmineProject, see (1)) in .htaccess file, Redmine.pm doesn't see it! I've tried to change <Location> to <Directory> and add AllowOverride All. Directives from .htaccess is visible, but remaining ones from <Directory> - not. I don't want to move all directives to each .htaccess. When I add <Location> in addition to <Directory>, again - only directives from <Location> are visible.

As far as I know, directives should be merged. I miss something?

© Server Fault or respective owner

Related posts about apache2

Related posts about redmine