*Perform the following steps [[Open_Terminal_as_root|as root user]] (change username and password):
{{Code|htpasswd -c -b .htpasswd username password}}
*Copy the <code>.htpasswd</code> file to the web application directory:
{{Code|cp .htpasswd /var/hda/web-apps/htpasswd}}
* Next, set the permissions.