How to create/protect password in web directory using httaccess Make file in Document root on which you want to protect password cd /var/www/html/ passdir Create file #vim .htaccess (add in file) authname &…