Click to See Complete Forum and Search --> : HTACCESS file problems


wk4997
03-31-2004, 03:14 AM
Hi,

I'm trying to password-protect a basic directory - that has nothing important in it for now - and it WILL NOT WORK!

I typed the following at the server prompt:
>> htpasswd -c .htpasswd user1
** password = password **

<.htaccess file code>
AuthType Basic
AuthName "Restricted Directory"
AuthUserFile /home/webmaste/.htpasswd
AuthGroupFile /dev/null

Require valid-user

</end>

<.htpasswd file code>
user1:0EM39We1Pzzas
</end>

filepath = http://apo.rose-hulman.edu/testdir/random.php

If you have any clue as to why this doens't work, please let me know.

Thanks,
Wes :(

TheBearMay
03-31-2004, 10:01 AM
Okay, looks like .htaccess is working correctly; i.e. it requires me to use an id and password; however, it doesn't look like your password is encrypted properly. Did you run it through a site like:

http://www.e2.u-net.com/htaccess/make.htm

wk4997
03-31-2004, 01:34 PM
Yeah, I just did... and it didn't work :(.

Here's the output from the site you gave me:

user1:6lfKjVFkmtLNc

** I pasted that into my .htpasswd file

-Wes

shimon
04-01-2004, 05:44 AM
Originally posted by wk4997
AuthUserFile /home/webmaste/.htpasswd

really 'webmaste'? if you copy and pasted this i would check the spelling of that

I personally never needed an AuthGroupFile directive either, and setting it to /dev/null won't achieve much. I would just remove that line

So there's two things you can try...best of luck, i know these ht password things can be a pain

TheBearMay
04-01-2004, 07:57 AM
The next thing to check then, is to make sure that you are using the correct FULL path to the .htpasswd file.

I usually put an SHTML file in the directory with a statement similiar to:

<!--#echo var="SCRIPT_FILENAME" -->

akadis
04-06-2004, 11:23 PM
can someone help me with mine?

http://literside.servehttp.com:8000/test/index.html

.htacces file:

AuthUserFile /website/test/.htpasswd
AuthName ByPassword
AuthType Basic


require valid-user


.htpasswd file:
alex:DbWc5OSg4qLP6

i get the login thing but my username and password wont work
un = alex pass = alex

im thinking posibly the password isn't encripted right, but i used the link suggested by TheBearMay
to make the htpasswd file

any help appreciated....

wk4997
04-07-2004, 02:11 AM
Hi,

The one thing that I did to make it "all better" was to make sure that my HTACCESS file was within my "httpd" directory.

For example,
/home/httpd/html/ is my directory to access my website. Now, you should place the file (the password file, at least) in a directory ABOVE the HTML directory - so that everyone can't see it. I made a new one... /home/httpd/password/ (notice the path)

Let me know if this works.
-Wes :)

akadis
04-07-2004, 07:32 AM
thanks but it did't work...

i put my .htpasswd file in c:\pass\.htpasswd

and my .htaccess file is in c:\website\test\.htaccess
my c:\website dirctory is my online directory (if its online it goes in there)

but still didn't work, any other suggestions?