I've created .htaccess and use htpasswd comand to create .htpasswd
Now when I try to access my protected area I still have loging panel.
I checked apache error log lile and found that there is some problem with mismatch password.
I use Apache 2.2 .22
Is there some erron in creating password via htpasswd?
Check to make sure your password files, etc are readable to the apache user. What are their permissions?
Please show exactly what you did. Obscure the passwords of course but we need to see your htaccess and the commands you ran and the parameters you used.
########## Start - Sekcja Uwierzytelnienie
AuthUserFile /var/auth/user/.htpasswd
## gdy nie stworzono pliku opisu grup umiesc
AuthGroupFile /dev/null
## albo - jesli stworzono plik opisu grup - odkomentuj i umiesc
#AuthGroupFile /var/auth/user/.htgroups #jesli stworzono
AuthName "Obszar chroniony"
AuthType Basic
# uzyj linii ponizej gdy jest plik opisu grupy admini (nazwa przykladowa)
require group admini
# albo zakomentuj linie powyzej a odkomentuj i uzyj ponizszej, gdy brak pliku o$
Require valid-user
########## Koniec - Sekcja Uwierzytelnienie
.htpasswd file in /var/auth/user/ (permissions 777):
777 is not the magic sledgehammer to solve all permissions problems. Things often refuse to use password files set 777, because a world-writable password file is simply dangerous.
Try setting it to more sensible permissions like 644 or 640.
########## Start - Sekcja Uwierzytelnienie
AuthUserFile /var/auth/user/.htpasswd
## gdy nie stworzono pliku opisu grup umiesc
#AuthGroupFile /dev/null
## albo - jesli stworzono plik opisu grup - odkomentuj i umiesc
#AuthGroupFile /var/auth/user/.htgroups #jesli stworzono
AuthName "Obszar chroniony"
AuthType Basic
# uzyj linii ponizej gdy jest plik opisu grupy admini (nazwa przykladowa)
require group admini
# albo zakomentuj linie powyzej a odkomentuj i uzyj ponizszej, gdy brak pliku o$
Require valid-user
########## Koniec - Sekcja Uwierzytelnienie
Set permission for .htpasswd to 644.
Stil get:
[Tue Dec 16 17:53:59 2014] [error] [client 192.168.200.16] user user: authentication failure for "/~user/private_html": Password Mismatch
[Tue Dec 16 17:54:05 2014] [error] [client 192.168.200.16] user user: authentication failure for "/~user/private_html": Password Mismatch
########## Start - Sekcja Uwierzytelnienie
AuthUserFile /var/auth/user/.htpasswd
## gdy nie stworzono pliku opisu grup umiesc
#AuthGroupFile /dev/null
## albo - jesli stworzono plik opisu grup - odkomentuj i umiesc
#AuthGroupFile /var/auth/user/.htgroups #jesli stworzono
AuthName "Obszar chroniony"
AuthType Basic
# uzyj linii ponizej gdy jest plik opisu grupy admini (nazwa przykladowa)
#require group admini
# albo zakomentuj linie powyzej a odkomentuj i uzyj ponizszej, gdy brak pliku o$
Require valid-user
########## Koniec - Sekcja Uwierzytelnienie
Still get:
[Tue Dec 16 20:14:44 2014] [error] [client 192.168.200.17] user user: authentication failure for "/~user/private_html": Password Mismatch
What character set are you using in the terminal, and what character set are you using in the webpage? A password from one character set might not match the hash of a password given in another character set. Make sure they agree.