Create a new .htaccess file
cd /var/www/mywebsite.com/secret
touch .htaccessInsert this value in the .htaccess file
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /home/mike/.htpasswd
Require valid-userCreate a new password file
htpasswd -c /home/mike/.htpasswd mikeLastly, restart apache2
service apache2 restart