[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

htaccess hell

I (or rather my distro) enabled userdir as follows:

LoadModule userdir_module /usr/lib/apache2/modules/mod_userdir.so

<IfModule mod_userdir.c>
        UserDir public_html
        UserDir disabled root

        <Directory /home/*/public_html>
                AllowOverride FileInfo AuthConfig Limit Indexes
                Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
                <Limit GET POST OPTIONS>
                        Order allow,deny
                        Allow from all
                <LimitExcept GET POST OPTIONS>
                        Order deny,allow
                        Deny from all

Document root is configured as follows:

        <Location />
                Options Indexes FollowSymLinks MultiViews
                AuthType Basic
                AuthName "Root Realm"
                AuthBasicProvider file    
                AuthUserFile /etc/apache2/passwd
                Require valid-user
                Order allow,deny
                allow from all

Now, I try to override the auth settings in a subtree of my
~/public_html by putting a .htaccess file there, which reads as follows:

AuthType Basic
AuthName "My Personal Space"
AuthUserFile /etc/apache2/passwd
Require User itz

Yet, no matter how many hairs I pull, when I GET anything under that
subtree, I'm asked to authenticate for "Root Realm".

I know that the .htaccess file is getting read, because when I drop
garbage there I get a server error upon loading that page.  So somehow
the AuthName directive in the .htaccess is getting ignored.  Why??
AllowOverride seems to allow it.

Version info:

 [8]ahiker:~$ dpkg --status apache2
Package: apache2
Status: install ok installed
Priority: optional
Section: httpd
Installed-Size: 36
Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org>
Architecture: i386
Version: 2.2.16-6+squeeze1

Ian Zimmerman
gpg public key: 1024D/C6FF61AD 
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Rule 420: All persons more than eight miles high to leave the court.

Reply to: