How to set up password-protected directory in Plesk
1.Find which directory is the Document Root directory for the domain at Plesk > Domains > example.com > Hosting Settings > Document Root:
2. Navigate to Domains > example.com > Password-Protected Directories add the required directory that is located inside Document Root (relative path without httpdocs should be added):
In case it is needed to protect the whole website, specify "/" in the Directory name field.
3. To add a user to a password-protected directory:
Go to Websites & Domains > Password-Protected Directories. Click the desired password-protected directory(for example /test), and then click Add a User. Type in the username and password, and click OK.