Like suggested make sure to create the .htpasswd file in the right folder.
Another thing to check on is if the config of the apache allows usage of .htpasswd files.
Check your config for a line like
If it reads like
.htpasswd files are not used.
Change it to
(from mind check out apache.org page for correctness)