yeah. that sounds like the restriction is being applied via your httpd-vhosts configuration which is perfectly fine.
You can also enhance by restricting the directory to specific IP range, which will prevent bots trying to work out your password as they wont even get the password prompt.
I was just trying to sorting out this issue online and I did not manage to get htpasswd working.
According to your experience is it possible by simply setting the two files .htaccess and .htpasswd in the proper folder obtain a protection of the entire folder and sub folders?