Kyrylo Skobylko
Kyrylo Skobylko

Reputation: 23

Apache LocationMatch named regular expression strange behavior

I'm trying to create dynamic apache config for lots of directories with OpenID auth, but I never got it to work, I think that there's something wrong with named regexp, but I don't know.

Here's my virtualhost config:

AliasMatch ^/backup/(.*)$ /user_server_backups/$1
    <LocationMatch "^/backup/(?<sitename>[^/]+)">
            Require claim "roles:%{env:MATCH_SITENAME}"
            AuthType openid-connect
    </LocationMatch>

Whenever I try to access I got 401 I tried also using numbered regexp but as described in docs numbered regexps are ignored.

Upvotes: 0

Views: 337

Answers (1)

Hans Z.
Hans Z.

Reputation: 54118

You'll need to use at least version 2.4.2.1 of mod_auth_openidc, see: https://github.com/zmartzone/mod_auth_openidc/pull/469

Upvotes: 0

Related Questions