I have the following in my (Debian-style, split-file) config
<VirtualHost *> ServerName www.example.org DocumentRoot /var/www/example CustomLog /var/log/apache2/example/access.log combined <Directory /var/www/example/subdir/admin/> AllowOverride All AuthType Basic AuthName "admins only" AuthUserFile /etc/apache2/pass.txt Require valid-user </Directory> </VirtualHost>
And it's ignored, i.e. I can browse files in that directory, no login prompt.
LogLevel debug and I see
AH01628: authorization result: granted (no directives)
The log line is created by
[authz_core:debug] so it seems to recognize the auth lines are there, just not that it needs to actually do some authorisation.
all denied has no effect.
I seem to have all the modules I need.
I tried adding a
.htaccess in another directory and that logged "AuthType not allowed here".
AllowOverride All just about everywhere it's allowed.
Similar questions have not come up with a solution that works for me. Please tell me how to troubleshoot this and I'll be happy to try it and report back.