Page 1 of 1

' htaccess/htpasswd '

Posted: Thu Feb 05, 2004 12:53 pm
by Labbat
'.htacces/.htpasswd '
Hello,

I just recently got my .htaccess, and .htpasswd set up...
At first I couldn't get it to pop up...Now it does.

Im only trying to protect my 1 folder on my server, and that is
http://142.59.59.29/www/admin/ < Feel free to click on it..
Note* The .htaccess login comes up....

Now, below I have included my .htaccess file, and my .htpasswd
file, the .htpasswd file is MD5 Encrypted as you will see...
My .htaccess file, is in
C:\Program Files\Apache Group\Apache\htdocs\www\admin\
(where it should be I suppose)
And my .htpasswd file is in the same directory
- And everything works fine, except for the fact when I try and login and it says its wrong.... here are the files

.htpasswd
username:$apr1$6T4.....$F/Lz8XTl2EaM2ZL7ntBo1/

.htaccess
AuthName "Secure Area"
AuthUserFile 142.59.59.29/www/admin/.htpasswd
AuthType Basic

<Limit GET>
require valid-user
</Limit>

Now the problem seems to be...It still says my username/and or /password
is wrong....Would anyone know why?

Posted: Thu Feb 05, 2004 1:16 pm
by ol4pr0
well if i read it right you have the .htaccess && .htpasswd in the same dir???
NEVER DO THAT !!!
here is a example what you should put in youre htaccess

Code: Select all

AuthUserFile .htpasswd
AuthGroupFile /dev/null
AuthName "My Dog Did A Meep On The Rug"
AuthType Basic
AuthUserFile C:\Program Files\Apache Group\Apache\htdocs\www\admin\ 
deny from <someip> for exmple

<Limit GET POST>
 require valid-user
</Limit>
just put it in some other dir..

C:\Program Files\Apache Group\Apache\<somewhere here > outside youre webroot htdocs!!!