Click to See Complete Forum and Search --> : .htaccess is rejecting user login


eric1
05-18-2003, 07:56 PM
Hi,
I'm currently using RedHat 8.0/Apache 2.0.40 to run my website. I've recently added a private section to the site using .htaccess. I found a document on BigNoseBirds.com that walked me through creating the directory and then the .htaccess file. My file looks like this

AuthUserFile /var/www/html/secure/.htpasswd
AuthGroupFile /dev/null
AuthName "The Secret Page"
AuthType Basic
<Limit GET POST>
require user eric
</Limit>

I then created a user using the following command
htpasswd -c .htpasswd eric

Mind you all these things were done using vi while in the "secure" directory.

Ok, so i set up the link on the website and then gave it a whirl. I get the login box, but when i try to enter the user that i setup it denies me access and eventually throws me to a Authentication required page.

Did i miss a step? Or have i typed something incorrectly?

I'd appreciate any help that you can offer.

eric

BoomerADF
05-18-2003, 10:19 PM
Actually you need to place your .htpasswd file in a none public place This is not something you want in a public place. Try

/var/www

Then the first line of your .htaccess file would be

AuthUserFile /var/www/.htpasswd

eric1
05-19-2003, 08:05 AM
Ok, I changed the location of the htpasswd and then edited the .htaccess file to reflect these changes. However, I'm still running into the problem of the user not being able to get past the login screen. Could this be a permission issue with the user not having rights to the directory?

eric

BoomerADF
05-19-2003, 11:31 AM
Originally posted by eric1
Ok, I changed the location of the htpasswd and then edited the .htaccess file to reflect these changes. However, I'm still running into the problem of the user not being able to get past the login screen. Could this be a permission issue with the user not having rights to the directory?

eric

See if the .htpasswd file is even being made. If not do the file path to htpasswd -c .htpasswd eric and then see if its being created.

eric1
05-19-2003, 03:31 PM
I verified that the htpasswd file is created and then used vi to see if the user was listed. I saw both the username and the password (encrypted) in the file. I'm still struggling with the login issue and am determined to get it straightened out.

eric

eric1
05-19-2003, 10:41 PM
It is done!

i forgot to set my chmod permissions correctly on the files.
everything is working great.
Thanks,


eric