I have the following config in my .htaccess file, which is working in Apache 2.2, but not in 2.4:
SetEnvIf Request_URI ^/admin require_auth=true
AuthUserFile /var/www/site.htpasswd
AuthName "Admin Access"
AuthType Basic
Require all denied
Satisfy any
Require valid-user
Allow from env=!require_auth
How do I convert this to work in Apache 2.4? Basically, if the URI starts with /admin, then they should be asked for the password.