The default instructions to have basic http authentication failed on Ubuntu 12.04 Precise Pangolin. The reason seems to be that the htpasswd tool produces MD5 hashes by default, while the default apache2 installation on Ubuntu 12.04 expects SHA1 hashes. The symptoms are that login attempts always result in password mismatch:
[Fri Aug 17 13:45:52 2012] [error] [client 127.0.0.1] user admin: authentication failure for "/": Password Mismatch, referer: http://localhost/login/