Create an .htaccess file in the webroot:
AuthUserFile /app/www/.htpasswd AuthType Basic AuthName "Restricted Access" Require valid-user
Create a .htpasswd file:
htpasswd -c /app/www/.htpasswd [username]