Hi
I have created the .htaccess and .htpasswd in the path /usr/local/apache/cgi-bin/secure
I have checked both .htaccess and .htpasswd are located in the path but when I tried to access the secure directory by using the password I have created for .htpasswd, it does not accept it.
I have created the .htpasswd in plain text so to see that I have key in the correct password and still it does not allow me to access.
Here is what I did. For the httpd.conf:
Directory "/usr/local/apache/cgi-bin/secure">
deny from all
Options ExecCGI
AllowOverride AuthConfig
Order deny,allow
</Directory>
-------------
For .htaccess and chown root .htaccess & chmod 644 .htaccess
AuthType Basic
AuthUserFile /usr/local/apache/cgi-bin/secure/.htpasswd
AuthName Secure
require valid-user
satisfy any
--------------
For .htpasswd and chmod 644 .htpasswd
htpasswd -bcp /usr/local/apache/cgi-bin/secure/.htpasswd admin secure
--------------
Restarted my apache with the command:
apachectl stop
apachectl start
After that, I tried to access the directory:
http://www.yourdomain.com/cgi-bin/secure/
and when it asks for User Name and password, I have keyed in:
User name: admin
Password: secure
after 3 attempts, it says Authorization Required without allowing me to login.
Any idea where I have gone wrong ?
Thanks!
Regards
Edward Han