Hi all,
I'm trying to modify my website such that it will
prompt for user name and password for accessing. But there is some
problem.
The server uses Apache, and I want to make a certain
directory controlled-access. What I did is:
1. Use "htpasswd -c user1" to create a new user
"user1" and set password for it.
2. copy the generated passoword file "passwd" to the
controlled directory.
3. create a ".htaccess" under that directory with the
content
AuthType Basic
AuthName "Provide your pass" AuthUserFile /home/passwd Require user user1 However, when I tried to access this directory on web
browser, it prompted me to enter username and password, but would not recognize
the user "user1" and the password.
Could anybody tell me where I did wrong?
Thanks!
Best regards,
Leiyuan Li
|