I'm trying to protect a directory using .htaccess and .htpasswd.
I created the file .htpasswd in /home/marcos and looks such that:
profesor:weuqwhdiuqh
In the directory I want to protect (/var/www/privado) I have a .htaccess file with the following contents.
AuthUserFile /home/marcos/.htpasswd
AuthName Testing
AuthType Basic
require user profesor
If I access http://localhost/privado/privado.html
it should see the prompt to enter login data. Instead, the prompt does not appear and the page is displayed normally.
What am I doing wrong?.
I am using apache2 on Ubuntu 11.04 server.
These are the modules loaded (viewd on phpinfo)
core mod_log_config mod_logio prefork http_core mod_so mod_alias mod_auth_basic mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_deflate mod_dir mod_env mod_mime mod_negotiation mod_php5 mod_reqtimeout mod_setenvif mod_status
Thanks for the help.
Regards!