View previous topic :: View next topic |
Author |
Message |
The_Bell Apprentice
Joined: 01 Jul 2002 Posts: 157
|
Posted: Fri Nov 15, 2002 10:05 pm Post subject: Apache .htpasswd autht fails |
|
|
I am running an Apache web server and I added this .htaccess file ina dir I want to be user/password restricted: Code: | AuthUserFile .htpassword
AuthGroupFile /dev/null
AuthName "Sistema de Fitxers"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
|
The server seems to parse the file OK, because it prompts me for a username and a passqord, but whatever I type (correct or incorrect passwords), the don't seem to be working and I cannot acces the directori. I created the .htpassword file using Code: | htpasswd -c -b .htpassword username <password> |
Could anyone help? _________________ Live long and prosper |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Fri Nov 15, 2002 10:25 pm Post subject: |
|
|
This is probably not going to be very helpful, but a couple of security notes: I would recommend not surrounding require valid-user in a <Limit> directive: there's no benefit to doing so, and it will leave other methods unprotected. Secondly, I don't recommend storing passwords in any form underneath ServerRoot - put them someplace totally outside the accessible directory. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
mglauche Retired Dev
Joined: 25 Apr 2002 Posts: 564 Location: Germany
|
Posted: Fri Nov 15, 2002 10:52 pm Post subject: |
|
|
have a look into the .htpasswd file and check if it looks like:
<username>:<crypted password>
also . double check that apache can read the .htaccess file ! (if you did create it as root, perhaps it got 640 or similar permissions, and apache/nobody can't read it) |
|
Back to top |
|
|
mglauche Retired Dev
Joined: 25 Apr 2002 Posts: 564 Location: Germany
|
Posted: Fri Nov 15, 2002 10:53 pm Post subject: |
|
|
oh, another good thing to look at might be the apache error log usually in /var/log/apache/error.log |
|
Back to top |
|
|
|