1. Generate hash from your password. For that you can use any htpasswd tool or online service (for example, http://www.htpasswdgenerator.net/).
2. Create simple text file with previously generated hash.
3. Click Config button for your Apache server.
4. Upload the created file to the /var/www/webroot/ROOT folder.
5. In the /etc/httpd/conf folder open the httpd.conf file. Modify directory configurations by adding the following strings as it is shown in the picture below: