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:
deny from all
For .htaccess and chown root .htaccess & chmod 644 .htaccess
For .htpasswd and chmod 644 .htpasswd
htpasswd -bcp /usr/local/apache/cgi-bin/secure/.htpasswd admin secure
Restarted my apache with the command:
After that, I tried to access the directory:
and when it asks for User Name and password, I have keyed in:
User name: admin
after 3 attempts, it says Authorization Required without allowing me to login.
Any idea where I have gone wrong ?