This tutorial covers how to password protect a directory within a website. Users browsing to that directory in a web browser will be prompted for a password prior to being able to view it's contents.
It assumes you have first logged into Virtualmin.
Choose the domain you would like to add the protected directory account to. You can do that by selecting the domain name from the drop-down box on the top-left.
Choose whether the password protection should be for the entire website, a sub-directory, or part of cgi-bin.
If you choose a sub-directory or cgi-bin, enter the directory name you are protecting, relative to public_html or cgi-bin. For example, if the password protection should be on
http://example.com/secret/, then enter
secretinto the textbox.
Authentication Realm. This is the text that the user will see when being prompted for a password.
Now go into 'Edit Users' -> USERNAME -> Other User Permissions
In the selectbox next to
Allow access to web directories, select the directories this user should have permission to access.