chmod 600 /var/hda/web-apps/htpasswd
chown apache:apache /var/hda/web-apps/htpasswd}}
= If you have webmin installed =
After logging into webmin select “Others” on the left-hand side, click on “Protected Web Directories” and then select “Add protection for a new directory”.
In “Directory path” browse to/or enter the path to the ‘html’ web directory you wish to protect, in “Authentication realm” enter something like for example “Authentication required” (this will show up on the popup login box) and then click on create.
Now you need to setup users to allow login by clicking on “Add a new user” in “Associated users and groups”, when users have been created you should be good to go.
Note: After you have completed this process using webmin you can then select "un-protect selected directory" and use the HDA-Dashboard to enable/disable password protection.