Apache 2.4: Public Subdirectory with .htaccess

.htaccessapache-2.4authorization

I'm currently upgrading to Apache 2.4.

What puzzles me right now is how to create a public subdirectory using .htaccess only. The outer directory is protected by AuthType Basic

Previously, the directory contained the following .htaccess:

Satisfy Any
Allow from all

I'm at a loss at how to reproduce this in Apache 2.4. I tried any combination of the following, without luck:

AuthType None
Require all granted
AuthMerging Or

Best Answer

I tested this here and it works for me. Check that the .htaccess file is being read for each directory; perhaps enable authentication on the subdirectory temporarily with a different AuthName so you can verify.

Here's my setup, in case you find it useful. The directory with auth enabled is authtest; its subdirectory noauth has authentication disabled.

$ /usr/sbin/apache2 -v
Server version: Apache/2.4.7 (Debian)
Server built:   Jan  2 2014 01:47:52
$ cat /etc/apache2/conf-enabled/allow-htaccess-authtest.conf 
<Directory /var/www/html/authtest>
    AllowOverride AuthConfig
</Directory>
$ cat /var/www/html/authtest/.htaccess 
AuthType Basic
AuthName "ahoy hoy"
AuthUserFile /home/fission/htpasswd
Require valid-user
$ cat /var/www/html/authtest/noauth/.htaccess 
AuthType None
Require all granted

That syntax was pulled directly from the Apache docs for mod_authn_core