I have an apache 2.4 server with Kerberos auth for localnet users. Now I need to allow public access to it without auth but still require auth for localnet.
If I simply remove "Require valid-user" directive then local users do not authenticate.
If I allow one public ip, everyting works perfectly, local users get authenticated, remote user from this IP gets access:
<RequireAny> Require ip 18.104.22.168 Require valid-user </RequireAny>
But if try to allow everyone EXCEPT locallet:
<RequireAny> Require ip not 192.168 Require valid-user </RequireAny>
then I get "Syntax error: negative Require directive has no effect in directive"
If I embed exclusion into RequireAll:
<RequireAny> <RequireAll> Require ip not 192.168 <RequireAll> Require valid-user </RequireAny>
then I get an error "RequireAll directive contains only negative authorization directives".
<RequireAny> <RequireNone> Require ip 192.168 <RequireNone> Require valid-user </RequireAny>
gives an error "RequireNone directive has no effect in directive".
So how such exclusion should be done?