WARNING! central VestaCP software vendor was hacked in 2018

not sure if they fixed the problem and continue VestaCP development (a shame, it was really a very very nice web based gui to admin web and mailsevers)

it should work.

apache2 is processing the request.

nginx and lighttpd do not support .htaccess files, you will have to change their corresponding config files.

1. ssh into your server
2. go into your domain’s public_html directory

cd /home/admin/web/domain-name.com/public_html/
mkdir /home/admin/web/domain-name.com/public_html/protected; # create a folder that will be protected
vim index.php; # test file

fill it with:

 echo getcwd();

call it to see the path where to store your .htpasswd

generate it: http://www.htaccesstools.com/htpasswd-generator/

should get a line like:


fill the following file with the generated line:

vim /home/admin/web/domain-name.com/.htpasswd_domain-name

lets go back to our protected folder

cd /home/admin/web/domain-name.com/public_html/protected;
vim .htaccess; # create htaccess file

fill it with this content:

AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /home/admin/web/domain-name.com/.htpasswd_domain-name
Require valid-user



please check your error logs:

less /var/log/apache2/domains/domain-name.com.error.log;

hit shift+f to go into “follow mode” = screen updates whenever an error comes in.

to see if ti works… if not check your error log

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!