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