schizo, your solutions work very good. One suggestion that I could give is to use Plesk one step further so that you don't have to manually create/update the password file.
What I did was:
Step One
Create fake password protected directory on the main domain (domain -> Directories -> Add New Direcotry) with something that does not exist on the domain and can be easily identified, for example s-sample.
Step Two
Create the necessary users for that protected directory.
Step Three
Open your domain's base httpd configuration file, which will be on /var/www/vhosts/(domain)/conf/httpd.include
and loook for a line that contains
<Directory "/var/www/vhosts/(domain)/httpdocs/s-sample">.
Copy the lines between <Directory> and </Directory>, it should be something like:
Code:
AuthType Basic
AuthName "Restricted"
AuthUserFile /var/www/vhosts/(domain)/pd/d..s-sample
require valid-user
Step Four
Create the .htaccess file using the text from step three, and place it on the directory that you wish to protect on the subdomain.
Done!
If everything went fine, now your browser should request a user name and password, as provided from Plesk's interface.
Hope it proves useful
Bookmarks