httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ro...@differentpla.net
Subject [users@httpd] .htaccess causes 500 Internal Server Error
Date Mon, 16 Dec 2002 17:13:37 GMT
Note: After attempting to replicate my problem while typing this
email, I managed to find something that works.  Ain't that always the
way?  :-)

So, to summarise:

.htaccess files are causing '500 Internal Server Error' when using
'require user foo' or 'require valid-user'

I see 'configuration error: couldn't check access.  No groups file?'
in my error.log

This is "Apache/2.1.0-dev (Unix) DAV/2 SVN/0.15.0 (dev build) Server
at www.differentpla.net Port 80"

What have I done wrong?  What module did I forget to load?

Instead, I'm going to use 'require group foo', which does appear to be
working.

Thanks,
Roger.

---cut-here-if-you're-not-interested-in-the-details---

The gory details:

I'm attempting to set up a password-protected portion of my website.
Clients will generally be using IE.

The test site is at http://www.differentpla.net/secret/

I've edited my /etc/apache2/sites-available/differentpla.net file to
contain the following:

        <Directory /var/www/differentpla.net/html/secret>
                AllowOverride AuthConfig
        </Directory>

Without /var/www/differentpla.net/html/secret/.htaccess present, the
password prompt doesn't appear and the user can access the content
with no problem.

If I create the .htaccess file:

peculiar:/var/www/differentpla.net/html/secret> ls -al
total 16
drwxr-sr-x    2 roger    www          4096 Dec 16 16:47 ./
drwxr-sr-x    6 roger    www          4096 Dec 16 16:33 ../
-rw-r--r--    1 roger    www           198 Dec 16 16:41 .htaccess
-rw-r--r--    1 roger    www           175 Dec 16 16:37 index.html

peculiar:/var/www/differentpla.net/html/secret> cat .htaccess 
AuthType Basic
AuthName "Password Required"
AuthUserFile /var/www/differentpla.net/etc/password.file
require user roger

I created the password file using:

peculiar:/var/www/differentpla.net/etc> /usr/local/apache2/bin/htpasswd -c password.file
roger
New password: 
Re-type new password: 
Adding password for user roger

peculiar:/var/www/differentpla.net/etc> ls -al
total 12
drwxr-sr-x    2 roger    www          4096 Dec 16 16:40 ./
drwxrwsr-x    5 root     www          4096 Dec  3 12:02 ../
-rw-r--r--    1 roger    www            20 Dec 16 16:40 password.file

peculiar:/var/www/differentpla.net/etc> cat password.file 
roger:tsPgmBcCKoBDw

The password is 'foo'.  I'm not worried about telling you this.
There's nothing actually secret at that location ;-)

Having done that, I'm prompted for a user ID and password.  If I enter
the wrong user ID/password, the dialog box remains on the screen.

If I enter the correct user ID/password, I get a 500 Internal Server Failure.

The log file contains:

[Mon Dec 16 16:53:12 2002] [error] [client 193.119.19.130] user notme not found: /secret/index.html
[Mon Dec 16 16:53:30 2002] [crit] [client 193.119.19.130] configuration error:  couldn't check
access.  No groups file?: /secret/index.html

If I create a groups file, as suggested by the error:

peculiar:/var/www/differentpla.net/html/secret> cat .htaccess    
AuthType Basic
AuthName "Password Required"
AuthUserFile /var/www/differentpla.net/etc/password.file
AuthGroupFile /var/www/differentpla.net/etc/group.file
require group admins

peculiar:/var/www/differentpla.net/etc> ls -al group.file 
-rw-r--r--    1 roger    www            15 Dec 16 17:02 group.file

peculiar:/var/www/differentpla.net/etc> cat group.file 
admins: roger

...then it works fine.  The _problem_ comes from the fact that if I
leave the group file in place, and go back to 'require user roger',
then I still get the 500.  Same if I use 'require valid-user'.

I'm using Apache 2.1.0 from CVS, but I'm guessing that it won't have
changed too much from Apache 2.0.4x.  Correct me if I'm wrong.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message