This is more of a apache or web server configuration not a ubuntu linux configuration.
But anyway, assuming you are using Apache Web Server. Here is how to configure a directory in the webserver with password protection.
Hope it helps.

Ubuntu 11.04 code named natty narwhal is released download ubuntu 11.04
Read ubuntu 11.10 reviews and share yours now!!