Results 1 to 4 of 4
Im trying to password protect a folder on my webserver. I have everything working i.e. it asks for the username and password when I try to access the folder but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-01-2004 #1Just Joined!
- Join Date
- Feb 2004
- Posts
- 30
Problem getting .htaccess working
Im trying to password protect a folder on my webserver. I have everything working i.e. it asks for the username and password when I try to access the folder but when I enter them, it says the password or username is wrong (it is not, I have checked many, many times). I thought maybe apache doesn't have the rights to the .htpasswd file so i did a "chown root:apache .htpasswd" on it, but that didnt help.
This is my .htaccess files contents:
Yes, my .htpasswd file is located in /usr/local/apache2/htdocs/private. To create the user I made the file with the command htpasswd -c .htpasswd username, and it said user and password created.Code:AuthUserFile /usr/local/apache2/htdocs/private/.htpasswd AuthGroupFile /dev/null AuthName "private area" AuthType "Basic" <Limit GET POST> require valid-user </Limit>
Do I need to set some permissions or what? Please help, this is driving me nuts.
- 09-03-2004 #2Just Joined!
- Join Date
- Feb 2004
- Posts
- 30
bump
- 09-04-2004 #3Just Joined!
- Join Date
- Sep 2004
- Posts
- 21
u shoud change the group and not the owner of the file
.htpasswd tp apache. and give the read permission or whatever
u want to give , give to the group.
try these these commands..
# htpasswd -mc .htpasswd username
# chgrp apache .htpasswd
# chmod g+r .htpasswd
besides this make an entry in httpd.conf
inside the <Directory> block..
AllowOverride AuthConfig
Regards
KeenLearner
- 09-27-2004 #4Just Joined!
- Join Date
- Sep 2004
- Posts
- 1
problem with htaccess...
the problem is with the encryption algorithm used be htpaccess
you might use this perl script to generate the password for .htaccess file.
http://www.cse.iitd.ernet.in/~csd00377/misc/addpw.pl


Reply With Quote
